0
votes

I have created a custom post type called staff and have a custom taxonomy called staff-categories which has terms like Broker, Admin etc etc .

I have created the single page single-staff.php. Im stuck in the navigation part where I need the previous and next navigation to be in the same taxonomy. The default previous_post_link and next_post_link just didnt' help.

I dont want to use a plugin either. Can someone please help me to fix this?

<span class="left"><?php previous_post_link( '%link',' %title' ); ?></span>
<span class="right"><?php next_post_link( '%link', '%title'); ?</span>
1
<span class="left"><?php previous_post_link( '%link',' %title' ); ?></span> <span class="right"><?php next_post_link( '%link', '%title'); ?></span>.rahul251
Well you can either use plugin or write your own functions that do that. It's not a default functionality of those two functions ;)Miha Rekar
@miha Could you please tel me how to do it. I tried the plugin wordpress.org/extend/plugins/… . But it doesnt display anything. Its just blank when the "true" argument is setrahul251

1 Answers

1
votes

I had met with the same question, and i found the solution here: http://bucketpress.com/next-and-previous-post-link-in-same-custom-taxonomy