[countdown]

The shortcode displays a dynamic countdown timer.


Product


Shortcode Attributes

There are a number of shortcode attributes available which you can use to customize the output.

  1. datetime – The target date and time for the countdown in YYYY-MM-DD HH:MM:SS format.
  2. format – The format of the datetime string.
  3. days_label – Label to display for the days component.
    • Default: Days.
  4. hours_label – Label to display for the hours component.
    • Default: Hours.
  5. minutes_label – Label to display for the minutes component.
    • Default: Minutes.
  6. seconds_label – Label to display for the seconds component.
    • Default: Seconds.
  7. expire_message – Message to display when countdown expires.
    • Default: Expired.
  8. classes – Additional CSS classes to add to the countdown container.

Example Usage

[countdown datetime="2025-12-31 23:59:59" expire_message="The event has started!"]
[countdown datetime="2025-12-31 23:59:59" days_label="D" hours_label="H" minutes_label="M" seconds_label="S"]

Results

Example 1:
This example displays a countdown timer that counts down to December 31, 2025, at 23:59:59, and shows “The event has started!” once the target time is reached.

Example 2:
a countdown timer showing the remaining days (D), hours (H), minutes (M), and seconds (S) until December 31, 2025, at 23:59:59.
The datetime format must match exactly for the countdown to be displayed.
If the datetime is invalid or doesn’t match the format, nothing will be rendered.