Problem:
In the output of a View conditional shortcodes are being used to optionally display certain content, but seen on the front-end a [/wpv-conditional] closing tag erroneously appears.
Solution:
Client is also using the wpv-item shortcode to show different content for different iterations of the Loop.
The wpv-item shortcode is evaluated before the wpv-conditional shortcode, and so cannot be wrapped by a condition.
The conditional shortcode must come wholly after the relevant wpv-item shortcode.
Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-item
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional
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 4 replies, has 2 voices.
Last updated by 6 years, 6 months ago.
Assisted by: Nigel.