Live opening status banner in WordPress
An Open / Closed pill for the site header, computed on the shop's local time, with French public holidays, exceptional closures and the next opening time.
Here is an excerpt of this component's code in WordPress. The full code is free for members, ready to copy into your project.
This component also comes in
The code in WordPress
<?php
/**
* Plugin Name: Forge, Bandeau d'ouverture en direct
* Description: Une pastille « Ouvert / Fermé » pour l'en-tête du site, calculée à l'heure de la boutique, avec jours fériés français, fermetures exceptionnelles et prochaine ouverture. Ajoute la composition « Bandeau d'ouverture en direct » à l'éditeur de blocs.
* Version: 1.0.0
* Requires at least: 6.6
* Requires PHP: 8.1
* Author: Forge
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: forge-bandeau-horaires-ouverture
*<!-- wp:group {"tagName": "header", "className": "boh-header", "layout": {"type": "default"}} -->
<header class="wp-block-group boh-header"><!-- wp:html -->
<a class="boh-brand" href="#boh-accueil">
<span class="boh-brand__mark" aria-hidden="true">M</span>
<span class="boh-brand__name"><small>Cordonnerie</small> Marceau</span>
</a>
<!-- /wp:html -->
<!-- wp:html -->
<nav class="boh-nav" aria-label="Navigation principale">
<a href="#boh-services">Services</a>
<a href="#boh-tarifs">Tarifs</a>
<a href="#boh-contact">Contact</a>(() => {
if (!document.querySelector(".boh-header")) return;
document.querySelectorAll("[data-boh]").forEach((root) => {
const DAY = 86400000;
const summary = root.querySelector("summary");
const status = root.querySelector("[data-boh-status]");
const detail = root.querySelector("[data-boh-detail]");
const upcoming = root.querySelector("[data-boh-upcoming]");
const list = upcoming.querySelector("ul");
const holidayItem = root.querySelector("[data-boh-holiday]");
const rows = [...root.querySelectorAll("[data-boh-day]")];
const minutes = (value) => { const [h, m] = value.split(":"); return Number(h) * 60 + Number(m); };:root {
--boh-surface: #fffaf5;
--boh-panel: #ffffff;
--boh-text: #2b1d14;
--boh-muted: #6b5444;
--boh-line: #e7d9cb;
--boh-soft: #f6ebe0;
--boh-accent: #8a4b1f;
--boh-accent-hover: #6f3c18;
--boh-on-accent: #ffffff;
--boh-focus: #8a4b1f;
--boh-shadow: 0 12px 32px rgb(43 29 20 / 0.14);Free component: copy it freely, including for commercial projects.
Other breadcrumbs and pagination components in WordPress
Breadcrumbs and pagination components in WordPress
A bottom bar with Call, Directions and Free quote that tucks away while visitors read down the page and returns as soon as they scroll up. Built for tradespeople whose customers arrive on a phone.
- Tailwind
- React
- CSS
- WordPress

A slim bar at the top of the page with a message, a link and a close button; once closed, it stays hidden for the period you choose.
- Tailwind
- React
- CSS
- WordPress

A sticky sidebar table of contents for blog posts: it highlights the section being read, shows the reading time left and folds into a list under the title on mobile.
- Tailwind
- React
- CSS
- WordPress

A column of dots on the side of the page that follows the section being read and lets visitors jump to it, with a label on hover and focus.
- Tailwind
- React
- CSS
- WordPress

Step indicator
FreeAn order step indicator: finished steps clickable to go back, the current step announced, upcoming steps locked.
- Tailwind
- React
- CSS
- WordPress

Tooltips in four positions that open on hover, tap and keyboard focus, and close with Escape, as WCAG requires.
- Tailwind
- React
- CSS
- WordPress