Problem:
The customer wanted to display a countdown for the next event date from a custom post type for a music band, using a date field as the target. Although they initially used the Spectra Pro countdown block, they encountered challenges setting a dynamic end date directly.
Solution:
The Toolset Countdown block can use dynamic data for the countdown's end date. However, to make this work with Spectra Pro or any countdown block that accepts shortcode-based data, the customer could format Toolset's date field from a UNIX timestamp to a format compatible with Spectra. The steps included:
1. Creating a View Loop: Even when displaying a single upcoming event, creating a View loop within Toolset allows the countdown block to be placed dynamically within the loop.
2. Formatting the Date for Compatibility: Toolset provides methods to convert the date field from UNIX format, ensuring compatibility with external blocks like Spectra Pro if shortcodes are required.
The customer confirmed this setup worked, with the Toolset Countdown block operating dynamically within the loop for future events.
Relevant Documentation:
https://toolset.com/forums/topic/can-i-convert-a-custom-fields-date-format/
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 |
|---|---|---|---|---|---|---|
| - | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
| - | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Sao_Paulo (GMT-03:00)
This topic contains 1 reply, has 2 voices.
Last updated by 1 year, 8 months ago.
Assisted by: Mateus Getulio.