Next Post link in Single.php to next post in same category
-
Hey guys,
I’ve got a site that has a parent category of “portfolio” and 8 sub categories. Each sub category as numerous posts.
I’d like to have a link in the header of each post to have a NEXT button that will take the viewer to the next post WITHIN that sub category. when the viewer gets to the LAST post in the category, the link will take the viewer BACK to the main Portfolio page OR the the first post in that category.
<div class="alignleft"><?php previous_post_link('« %link','%title',TRUE,'') ?></div>
<div class="alignright"><?php next_post_link('%link »','%title',TRUE,'') ?></div>
is NOT what works. gotta find something else. like, maybe using the_permalink() markup somehow within a query_post but i’m not sure how to implement it.
if this makes sense, let me know your thoughts.
thanks
TD
- The topic ‘Next Post link in Single.php to next post in same category’ is closed to new replies.