library/Theme/Navigation.php
public function pageForPostTypeNavigation($posts)
    {
        if (is_main_query() && is_single() && isset($posts[0])) {
            $postType = $posts[0]->post_type;
            $parent = get_option("page_for_{$postType}");

            if ($parent) {
                $posts[0]->post_parent = $parent;
            }
        }

        return $posts;
    }
public function pageForPostTypeNavigation($posts)
    {
        if (is_main_query() && is_single() && isset($posts[0])) {
            $postType = $posts[0]->post_type;
            $parent = get_option("page_for_{$postType}");

            if ($parent) {
                $posts[0]->post_parent = $parent;
            }
        }

        return $posts;
    }
public function pageForPostTypeNavigation ( $ posts ) { if ( is_main_query ( ) && is_single ( ) && isset ( $ posts [ 0 ] ) ) { $ postType = $ posts [ 0 ] -> post_type ; $ parent = get_option ( "page_for_{$postType}" ) ; if ( $ parent ) { $ posts [ 0 ] -> post_parent = $ parent ; } } return $ posts ; }
Fix sidebar nav if "page for post type" is same as the curretn post's post type
@param  array $posts
@return array
Fix sidebar nav if page for post type is same as the curretn post s post type