[Resolved] Check taxonomy values of prev/next post in single post
This support ticket is created 5 years ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
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.