Problem:
How to conditionally style something in a loop output based upon a conditional field value.
Solution:
Add a container div and set a class—used to add the required styles—conditionally, using wpv-conditional, something like:
<div class="existing-class [wpv-conditional ...condition...]red-border[/wpv-conditional]">
You can read more about the specifics of the conditions in the linked documentation.
Relevant Documentation:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/checking-types-fields-and-custom-fields/
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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
This topic contains 2 replies, has 2 voices.
Last updated by 6 years, 6 months ago.
Assisted by: Nigel.