0

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>
soju
  • 25,111
  • 3
  • 68
  • 70
rahul251
  • 68
  • 1
  • 2
  • 13
  • 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 Oct 11 '12 at 13:16
  • @miha Could you please tel me how to do it. I tried the plugin http://wordpress.org/extend/plugins/previous-and-next-post-in-same-taxonomy/ . But it doesnt display anything. Its just blank when the "true" argument is set – rahul251 Oct 11 '12 at 13:24

1 Answers1

1

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

Flo
  • 11
  • 1