Effects · Gutenberg

Countdown block for WordPress

Display a countdown timer to a specific date and time.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

Display a countdown timer to a specific date and time.

Inspector panels on this block: Date & Time, Display Options, Labels, Expiration. Those titles come from index.js, not from a shared template.

Behavior controls: “Layout Style” options: Cards, Inline, Minimal, Circle; “When Expired” options: Show Message, Hide Block, Redirect, Keep Last State.

Where to find it

Gutenberg inserter → Effects → search “Countdown” (block name `blockenberg/countdown` in block.json). Style it in the sidebar after insert.

How to use Countdown block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Countdown”, insert it. Category: Effects.
  3. Configure inspector controls that exist on this block. Open Date & Time. Set “Evergreen Mode”, “Days”, “Hours”, “Minutes”.
  4. Check the published page. The view script reads HTML data attributes: data-evergreen, data-evergreen-duration, data-evergreen-id, data-expired-action, data-expired-message, data-expired-redirect, data-show-labels, data-show-separators. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Evergreen ModeOn/off toggle in the inspector. On by default. Saved as `evergreenMode`.
DaysNumeric range control in the inspector. Range 0–30. block.json default: 0. Saved as `evergreenDays`.
HoursNumeric range control in the inspector. Range 0–23. block.json default: 24. Saved as `evergreenHours`.
MinutesNumeric range control in the inspector. Range 0–59. block.json default: 0. Saved as `evergreenMinutes`.
Layout StyleSelect control; the chosen value is saved on the block. Options: Cards; Inline; Minimal; Circle. block.json default: cards. Saved as `layoutStyle`.
Show TitleOn/off toggle in the inspector. Off by default. Saved as `showTitle`.
Show DaysOn/off toggle in the inspector. On by default. Saved as `showDays`.
Show HoursOn/off toggle in the inspector. On by default. Saved as `showHours`.
Show MinutesOn/off toggle in the inspector. On by default. Saved as `showMinutes`.
Show SecondsOn/off toggle in the inspector. On by default. Saved as `showSeconds`.
Show LabelsOn/off toggle in the inspector. On by default. Saved as `showLabels`.
Show SeparatorsOn/off toggle in the inspector. On by default. Saved as `showSeparators`.
Days LabelText field in the inspector. block.json default: Days. Saved as `labelDays`.
Hours LabelText field in the inspector. block.json default: Hours. Saved as `labelHours`.
Minutes LabelText field in the inspector. block.json default: Minutes. Saved as `labelMinutes`.
Seconds LabelText field in the inspector. block.json default: Seconds. Saved as `labelSeconds`.
When ExpiredSelect control; the chosen value is saved on the block. Options: Show Message; Hide Block; Redirect; Keep Last State. block.json default: message. Saved as `expiredAction`.
Expired MessageText field in the inspector. block.json default: Time's up!. Saved as `expiredMessage`.
Redirect URLText field in the inspector. Saved as `expiredRedirectUrl`.
DigitShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoDigit`.
LabelShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoLabel`.
Typography — TitleShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoTitle`.
Container PaddingNumeric range control in the inspector. Range 0–60. block.json default: 24. Saved as `padding`.
Gap Between UnitsNumeric range control in the inspector. Range 8–48. block.json default: 16. Saved as `gap`.
Digit Box PaddingNumeric range control in the inspector. Range 8–40. block.json default: 20. Saved as `digitPadding`.
Container RadiusNumeric range control in the inspector. Range 0–30. block.json default: 12. Saved as `borderRadius`.
Digit Box RadiusNumeric range control in the inspector. Range 0–24. block.json default: 8. Saved as `digitRadius`.
Colors — BackgroundColor control in the inspector. Saved as `wrapBg`.
Digit BackgroundColor control in the inspector. block.json default: #1e293b. Saved as `digitBg`.
Digit ColorColor control in the inspector. block.json default: #ffffff. Saved as `digitColor`.
Label ColorColor control in the inspector. block.json default: #64748b. Saved as `labelColor`.
Separator ColorColor control in the inspector. block.json default: #94a3b8. Saved as `separatorColor`.
Title ColorColor control in the inspector. block.json default: #1e293b. Saved as `titleColor`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Countdown block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Countdown”. It sits under Effects. After insert, open Date & Time and set “Evergreen Mode”, “Days”, “Hours”, “Minutes”.

Where does Countdown store visitor state?

In localStorage on that browser. Clearing site data resets it. It is not a WordPress user meta field unless render.php says so.

Is the Countdown Gutenberg block free?

Yes. Countdown ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Countdown to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Date & Time, Display Options, Labels, Expiration).

Related effects blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Countdown from the Gutenberg inserter.

Get Blockenberg