Problem:
I am having an issue with my shortcode in Toolset. I'm trying to display specific text based on start and end date fields, but it isn't working as expected.
Solution:
Remove the format attribute from the shortcode, as dates are stored as a UNIX timestamp in Toolset and this format is not required. Also, check the query filter that you used to get the data for the post type. Here's the modified shortcode:
[wpv-conditional if="( $(wpcf-start-date) lte 'TODAY()' ) AND ( $(wpcf-end-date) gte 'TODAY()' )"] ON DISPLAY [/wpv-conditional] [wpv-conditional if="( $(wpcf-start-date) gte 'TODAY()' )"] Coming Soon [/wpv-conditional] [wpv-conditional if="( $(wpcf-end-date) lte 'TODAY()' )"] Archive [/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.
This topic contains 2 replies, has 2 voices.
Last updated by 1 year, 6 months ago.
Assisted by: Christopher Amirian.