Problem: I would like to set up a conditional that tests the time of the most recent post edit. If the most recent edit was less than 5 minutes ago, I would like to show some content.
Solution: Use the wpv-post-date shortcode to output a Unix timestamp, subtract that value from NOW(), and compare that value against the number of seconds in 5 minutes (300) using the following syntax:
[wpv-conditional if="( (NOW() - [wpv-post-date type="modified" format="U"] ) lt 300 )"] ...the most recent edit was less than 5 minutes ago... [/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.
Our next available supporter will start replying to tickets in about 0.77 hours from now. Thank you for your understanding.