how to show next post link of CPT only if is in same taxonomy
-
i have one CPT called ‘Socio’ with a taxonomy called ‘pagato’.
i have 5 post of ‘Socio’ but only 3 have ‘pagato’ as taxonomy.
when i view the single page i want navigation show next-link of the next post that has ‘pagato’ as taxonomy and NOT the link of the next post in general.
how can navigate (show the link to the previous/next article) from single post to another only if is in the same taxonomy?
i tried to use:<?php previous_post_link( ‘%link’, ‘%title’, true ); next_post_link( ‘%link’, ‘%title’, true ); ?>
with TRUE but it doesn’t works!!
can anyone help me?
thanks
bye
Maurizio
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘how to show next post link of CPT only if is in same taxonomy’ is closed to new replies.