Aleš Sýkora wrote

Category Specific Conditional IF

31. 12. 2019 in

If you need to use conditional IF to display posts for some specific category, here is example conditional how to do that:

[wpv-conditional if="( CONTAINS(#(category),'homecoming-series-upcoming-events') )"]

<h2>Homecoming Series</h2>

[wpv-conditional]

If you want to display posts not in category, then use ! as negotiation:

[wpv-conditional if="( !CONTAINS(#(category),'homecoming-series-upcoming-events') )"]

<h2>Not Homeacoming Series</h2>

[wpv-conditional]

Credits: Bryan Candy, Toolset User Group on facebook.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

More from category
Aleš Sýkora wrote
Limit Toolset Form to one submission per user only
25. 6. 2021 in
The easiest way to enable user submit only one post is to hide the form when they already submitted it. So you need to count the number of posts user created and if it is more than 1 then with conditional hide the form. Check the number of posts user created with custom function 3. […]
Read More
Aleš Sýkora wrote
Conditional check if page is parent or child in WordPress
14. 1. 2021 in
If you need to display something only if post has childs (or not), you can use this conditional in your code.
Read More
Aleš Sýkora wrote
Toggle Table Row with jQuery (usable in Toolset)
31. 12. 2019 in
If you want toggle to open a new row in the table, then you need to use some jQuery with Toolset again. First – create the table (you can use it in view, content tempate, etc.). All credit for this example goes to jsfiddle: http://jsfiddle.net/GqS7W/. And use it with this jQuery script. Do not forget […]
Read More
magnifiercross linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram