Business · Gutenberg

Business Hours block for WordPress

Display business opening hours with current status indicator.

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 business opening hours with current status indicator.

Inspector panels on this block: General, Layout, Labels, Status Colors. Those titles come from index.js, not from a shared template.

Behavior controls: “Layout — Style” options: List, Cards; “Time Format” options: 12 Hour (9:00 AM), 24 Hour (09:00).

Where to find it

Gutenberg inserter → Business → search “Business Hours” (block name `blockenberg/business-hours` in block.json). Style it in the sidebar after insert.

How to use Business Hours block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Business Hours”, insert it. Category: Business.
  3. Configure inspector controls that exist on this block. Open General. Set “Show Title”, “Show Current Status”, “Highlight Today”, “Show Dividers”.
  4. Check the published page. The view script reads HTML data attributes: data-close, data-closed, data-closed-text, data-highlight-today, data-initialized, data-open, data-open-text, data-show-status. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Show TitleOn/off toggle in the inspector. On by default. Saved as `showTitle`.
Show Current StatusOn/off toggle in the inspector. On by default. Saved as `showCurrentStatus`.
Highlight TodayOn/off toggle in the inspector. On by default. Saved as `highlightToday`.
Show DividersOn/off toggle in the inspector. On by default. Saved as `showDividers`.
Layout — StyleSelect control; the chosen value is saved on the block. Options: List; Cards. block.json default: list. Saved as `layoutStyle`.
Time FormatSelect control; the chosen value is saved on the block. Options: 12 Hour (9:00 AM); 24 Hour (09:00). block.json default: 12h. Saved as `timeFormat`.
Layout — PaddingNumeric range control in the inspector. Range 8–32. block.json default: 16. Saved as `padding`.
Layout — GapNumeric range control in the inspector. Range 4–24. block.json default: 12. Saved as `gap`.
Border RadiusNumeric range control in the inspector. Range 0–20. block.json default: 8. Saved as `borderRadius`.
Closed TextText field in the inspector. block.json default: Closed. Saved as `closedText`.
Open Now TextText field in the inspector. block.json default: Open Now. Saved as `openNowText`.
Closed Now TextText field in the inspector. block.json default: Closed Now. Saved as `closedNowText`.
Colors — BackgroundColor control in the inspector. block.json default: #ffffff. Saved as `dayBg`.
Day TextColor control in the inspector. block.json default: #1e293b. Saved as `dayColor`.
Time TextColor control in the inspector. block.json default: #64748b. Saved as `timeColor`.
DividerColor control in the inspector. block.json default: #e2e8f0. Saved as `dividerColor`.
Today BackgroundColor control in the inspector. block.json default: #f0f9ff. Saved as `todayBg`.
Today TextColor control in the inspector. block.json default: #0369a1. Saved as `todayColor`.
Open StatusColor control in the inspector. block.json default: #22c55e. Saved as `openColor`.
Closed StatusColor control in the inspector. block.json default: #ef4444. Saved as `closedColor`.

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 Business Hours block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Business Hours”. It sits under Business. After insert, open General and set “Show Title”, “Show Current Status”, “Highlight Today”, “Show Dividers”.

What makes Business Hours different from other Blockenberg blocks?

Display business opening hours with current status indicator. Inspector labels on this block include “Show Title”, “Show Current Status”, “Highlight Today”, “Show Dividers”.

Is the Business Hours Gutenberg block free?

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

Can I style Business Hours 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: General, Layout, Labels, Status Colors).

Related business blocks

Get Blockenberg

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

Get Blockenberg