Problem: I have a View of posts in which I have nested another View of taxonomy terms. I would like to filter the View of taxonomy terms so that only those terms applied to the current post in the loop are displayed. If no terms are found associated with the current post in the loop, that post should not be displayed in the results.
Solution: Use the legacy View editor to create and manage nested Views, since this feature is not supported in the Block editor. In the inner nested View, add a taxonomy term Query Filter that filters by the current post. In the Loop Editor, insert the wpv-taxonomy-title shortcode in the loop to display the term title, or use other shortcodes to display other information like the term slug, term archive link, or custom term fields. Include information about the parent post in the wpv-items-found section using shortcodes, but do not place parent post shortcodes inside the wpv-loop tags. Anything in the wpv-loop tags will be repeated for each matching term.
Relevant Documentation:
https://toolset.com/course-lesson/creating-a-view/#filter-the-list-of-posts
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/
https://toolset.com/documentation/customizing-sites-using-php/functions/
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/
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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 4 replies, has 2 voices.
Last updated by 3 years, 3 months ago.
Assisted by: Christian Cox.