hello,
I have a custom post type with several custom taxonomies. In a single post content template I am trying to create links to prev/next posts but only for posts with certain taxonomy values. Is there a way to achieve this?
Tell us what you are trying to do?
E.g.
1) I have a custom taxonomy "portfolio" which includes e.g. "photo" value. Then I have another custom taxonomy e.g. "homepage" with e.g. "hp-yes" value.
2) Let's say current post has "photo" value in "portfolio" taxomony and value "hp-yes" in "homepage" taxonomy attached.
3) I need the prev/next links to link only to previous and next posts with the "photo" and "hp-no" taxonomy values attached.
Is there any documentation that you are following?
- Didn't find any covering this particular problem
Hello. Thank you for contacting the Toolset support.
I understand what you are looking for and you want to filter your prev and next single post pagination links with the specific terms of the current post.
There is no such feature available with Toolset but I've a workaround to offer you using which you can implement such custom requirement.
You can achieve this by using the get_next_post_where and get_previous_post_where native WordPress hooks to filter the prev-next post link on single post.