custom post types – get_the_post_navigation not working

Question

I am using a custom post type with 9 posts. Whichever post I click on the_post_navigation shows the same post. When I go to that post it shows the only other post in its taxonomy. From then on I can only navigate between the two posts in this taxonomy. I’m using the code below:

$args = array(
    'prev_text' => '<span class="meta-nav">&lt;</span> Previous: %title',
    'next_text' => 'Next: %title <span class="meta-nav">&gt;</span>',
);
echo get_the_post_navigation( $args );

0
Badger 1 week 2022-09-17T10:23:45-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse