Limit Next & Previous on Single Post page to same category
-
Forgive me if this question is beyond the scope of support… I just really admire your themes and I’m attempting to teach myself more advanced theme development.
Is it possible to set the prev/next pagination to only show topics from the same category?
I can see in pagination.php
$has_previous_link = get_previous_posts_link(); $has_next_link = get_next_posts_link();
After some research it seems as if changing those lines to add parameters would work:
$has_previous_link = get_previous_posts_link( $in_same_term = true, $taxonomy = 'category' ); $has_next_link = get_next_posts_link( $in_same_term = true, $taxonomy = 'category' );
However, that doesn’t seem to do it. So, to reiterate…
How can I set the prev/next pagination to only show topics from the same category?If this is out of scope consider this a feature request for customizer.
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Limit Next & Previous on Single Post page to same category’ is closed to new replies.