Problem:
How to check parent post checkbox value and display content conditionally.
Solution:
Using [wpv-conditional] shortcode we can dispaly conditional output. To check parent post custom field value using types shortcode you should add "id" attribute to types shortcode.
For example:
[types field='presbyter-section-1' id='$ministers'][/types]
Where:
"ministers' is a parent post slug.
To check field value we will use [wpv-conditional] shortcode:
For example:
[wpv-conditional if="( '[types field='presbyter-section-1' id='$ministers'][/types]' eq '1' )"] Condition is True [/wpv-conditional]
Relevant Documentation:
=> https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
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 |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
This topic contains 3 réponses, has 2 voix.
Last updated by Ronald E Il y a 8 années et 1 mois.
Assisted by: Minesh.