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;
    }