Problem:
Hide posts of parent category in the nested view (parent-child views).
Solution:
If you want to display the parent category but simply exclude the posts for this, you could use HTML conditional output in your Posts View.
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/displaying-taxonomies-conditionally/ > Checking if a post has a specific term assigned
For example, you can exclude multiple categories using conditional output with AND operator, like this:
[wpv-conditional if="( '[wpv-taxonomy-slug]' ne 'slug1' ) AND ( '[wpv-taxonomy-slug]' ne 'slug2' )"] Content goes here [/wpv-conditional]
Relevant Documentation:
- Related thread: https://toolset.com/forums/topic/hide-posts-on-category-parent/#post-380505
- https://toolset.com/documentation/user-guides/conditional-html-output-in-views/displaying-taxonomies-conditionally/
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 |
---|---|---|---|---|---|---|
- | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | - |
- | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | - |
Supporter timezone: Asia/Karachi (GMT+05:00)
This topic contains 5 replies, has 2 voices.
Last updated by 7 years, 5 months ago.
Assisted by: Noman.