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>