AfterDone Holiday Hours – Opening Hours with Automatic Public Holidays
Opening hours and business hours with a live open/closed badge and upcoming closures.
Install in
AfterDone Holiday Hours shows a business’s weekly opening hours (store hours, office hours, or business hours), a live “Open now” or “Closed – Thanksgiving Day” badge, and a list of upcoming closures. Public holidays for the country you choose, and for a region when the calendar has one, are applied automatically. You do not have to type in Christmas, Easter Monday, or a bank holiday every year.
Bundled holiday tables list 248 countries and territories for 2026 through 2031 (a few have no dates in this release, see the FAQ), with regions for 34 of them (for example US states, Canadian provinces, German states, and the four nations of the United Kingdom). The tables are files inside the plugin. Nothing is downloaded and no API key is needed.
The badge is calculated in the visitor’s browser from the embedded schedule and the visitor’s clock. It is checked again about once a minute from that same schedule, in the business time zone. A full-page cache can store the page, and it still will not freeze yesterday’s open or closed state. Browsers without JavaScript get the same calculation from PHP at request time. The page also includes OpeningHoursSpecification and specialOpeningHoursSpecification JSON-LD. Special hours are the days that differ from the weekly schedule, such as a holiday that closes a normally open day.
Who it is for
Shops, restaurants, cafés, clinics, salons, offices, libraries, and any site that needs to answer “are you open today?” and “are you open on the holiday?” on its own website.
What you can set
- Weekly hours, with a second interval for a lunch break. A closing time earlier than the opening time stays open past midnight.
- A country and, where the bundled calendar has them, a region. Countries with no bundled dates are left out of the list.
- Per-holiday “Open on this holiday” checkboxes. Checked holidays use the weekly schedule. Some holidays start checked: days when shops usually stay open, and an observed date within three days of the same holiday, so the business is not closed on both dates.
- Per-holiday overrides: stay closed, use regular hours, or set custom hours. An override replaces the checkbox for that holiday name.
- Manual closures for a vacation or a one-off date, including custom hours.
- A named time zone. The badge uses that zone, not the visitor’s zone.
- Optional LocalBusiness JSON-LD. It is on until you turn it off.
Shortcode
[holiday_hours view="all" days="60" show_holiday_names="1" location=""]
viewisbadge,week,closures, orall.daysis how many days ahead the closures list looks (1–180).show_holiday_nameshides public-holiday names when set to0. Labels you wrote for manual closures stay visible.locationis accepted and ignored. Every value uses the schedule from this plugin’s settings screen. A separate add-on can read the attribute.
The AfterDone Holiday Hours block has the same choices, including an optional location attribute with the same meaning.
Holidays
Dates for 2026 through 2031 are bundled. They are generated from python-holidays 0.82 (MIT). The plugin does not ship that library’s code, and it does not use the date-holidays dataset. See THIRD-PARTY-NOTICES.txt for the copyright and license. Names are in English when python-holidays provides an English catalog. Otherwise the library’s default language is used, so Italy’s names are Italian.
A normal public holiday is closed. A holiday flagged as usually open for shops, and an observed date within three days of the same holiday, uses the weekly schedule until you change it. If several holidays fall on one day, every one of them must be open on the weekly schedule, or all of them must be set to the same custom hours. Otherwise the day stays closed. A manual closure on that date wins.
Privacy
AfterDone Holiday Hours does not phone home, load a CDN, or send analytics. CSS and JavaScript are files in the plugin. There is no Freemius SDK. A separate add-on is its own plugin. The hooks it can use are listed in the FAQ.
Source code and build
Unminified block source is in src/ (index.js, edit.js, and block.json). build/index.js is the unminified webpack build of those files. This copy of the plugin also includes package.json, package-lock.json, webpack.config.js, babel.config.js, and scripts/finalize-build.mjs. From the plugin directory, run npm ci && npm run build.
Written by Joobi from the project's own listing. See the source page
1.0.3
- Plugin name is AfterDone Holiday Hours – Opening Hours with Automatic Public Holidays. Text domain is afterdone-holiday-hours.
- The no-JavaScript badge fallback no longer prints a style tag. An enqueued inline script adds the hhours-js class, and the stylesheet hides the placeholder when that class is absent.
- Block source and the build tools are included in the plugin. See Source code and build.
1.0.2
- Holidays where shops usually stay open, including United States Columbus Day and Veterans Day, use regular weekly hours until you change them. An observed date within three days of the same holiday is not closed as well.
- Settings lists the selected country’s holidays with an “Open on this holiday” checkbox. Schedules saved in 1.0.1 keep the overrides you already set.
- “Output structured data (JSON-LD)” turns off the LocalBusiness block. The
hhours_jsonldfilter turns it off when it returns false or an empty array. - The open or closed badge refreshes about once a minute from the schedule already on the page, in the business time zone.
- Ukraine, Sri Lanka, Bouvet Island, Heard Island and McDonald Islands, and the British Indian Ocean Territory are left out of the country list because those tables have no dates for 2026 through 2031.
- Readme name, tags, and description.
1.0.1
- The shortcode and block accept a
locationattribute. This plugin still renders the one schedule from its settings screen for every value. hhours_render_settingslets a separate add-on supply the settings for one shortcode or block.HHours_Renderer::config_from_settings()is public so an add-on can evaluate a schedule with the same holiday list as the badge.
1.0.0
- Initial release.
- Weekly hours may cross midnight. The badge stays open until that closing time on the next day, including across daylight-saving changes and the new year.
- A holiday or manual closure on the day an overnight interval opens removes the next morning as well. A holiday on the next day does not cut that tail short.
- Overlapping intervals are rejected on the settings screen.
- JSON-LD keeps a past-midnight interval on the day it opens.
- Tested with WordPress 7.1.5.
Follow this listing's changes (Atom feed)