Problem: I am trying to create a conditional that tests if a custom date field is between TODAY() and MONTHS_FROM_NOW(2), but it's not working as expected. A date one month from now is hidden by the conditional.
Solution: Use the following format with no line breaks and enclosing parentheses around both clauses:
[wpv-conditional if="(( $(wpcf-rental_end) gt 'TODAY()' ) AND ( $(wpcf-rental_end) lt 'MONTHS_FROM_NOW(2)' ))"]Condition is true[/wpv-conditional]
Relevant Documentation:
https://toolset.com/documentation/user-guides/views/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.
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 4 years, 4 months ago.
Assisted by: Christian Cox.