Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Im trying to make previous_post_link and next_post_link work inside a custom post type, inside a same category (taxonomy) but its not working.

It this posible ?

Im trying

<?php previous_post_link('<div class="posts-next">%link</div>', 'Next in category',TRUE); ?>
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I'd suggest using a plugin for this. next_post_link and previous_post_link will use the category taxonomy (literally)*, so they will not work as expected with custom taxonomies, which I think you are using here.

I've used both Smarter Navigation by Scribu and Ambrosite Next/Previous Post Link Plus, which are both great plugins for this sort of thing.

*See the source for get_adjacent_post() which is used by WP's next/previous_post functions in \wp-includes\link-template.php to see how "category" is hard-coded.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.