| 开发者 | itboffins |
|---|---|
| 更新时间 | 2026年10月21日 04:42 |
| PHP版本: | 7.2 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
itboffins-live-opening-hours folder to /wp-content/plugins/, or install through the Plugins screen.[iboh_opening_hours] shortcode to a page.The page table and notice bar use your saved schedule in the visitor's browser. That lets the open/closed message and today's row stay current without you editing the page.
Yes. The open/closed banner, today's row, and upcoming-date notices are worked out in the visitor's browser, so they stay correct on a cached page. When you edit the hours, the plugin asks common caching plugins to refresh so the new schedule reaches visitors.
By default, your site's WordPress timezone (Settings -> General). The Timezone card on the Live Opening Hours screen can instead pin the schedule to a city of its own. The "Right now it is..." line under the customer preview shows the time the plugin is working from, so you can check it at a glance. Always choose a city (such as Europe/London or America/Anchorage) rather than a "UTC-9"-style offset: a fixed offset never changes for daylight saving, so the plugin would run an hour out for part of the year.
Your timezone is almost certainly set to a fixed UTC offset. For example, Alaska is UTC-9 in winter but UTC-8 in summer, so a site set to "UTC-9" runs an hour behind from March to November. Open Live Opening Hours, look at the "Right now it is..." line under the preview, and in the Timezone card choose the nearest city (America/Anchorage for Alaska). The plugin warns you whenever a fixed offset is in use.
The live open/closed status always updates in the visitor's browser. The schedule itself, though, is part of the page, so if you use a page-caching plugin the new hours appear once that cache is refreshed. Saving asks WP Rocket, W3 Total Cache, WP Super Cache, WP Fastest Cache, LiteSpeed Cache, SiteGround Optimizer, Autoptimize, Cache Enabler, Breeze, Hummingbird, and Nginx Helper to clear automatically; other caches, including host-level caches, may need clearing by hand.
Yes. Displayed hours support the wall-clock tokens G, H, g, h, i, s, a, and A, plus backslash-escaped literals. Other PHP date-format characters remain literal because a saved opening time is not a complete timestamp from which timezone- or instant-dependent tokens can be calculated reliably.
Yes. In Live Opening Hours, use the bank-holiday helper inside Holidays & one-off dates. Choose England & Wales, Scotland, or Northern Ireland, pick the year, and add the standard dates as closed dates. One-off public holidays can still be added manually.
In Your regular week, every day has an Open / Closed switch. Choose Open and the day gets a time you can edit (add another for a lunch break); choose Closed and the day shows "Closed all day". For a single date, add it under Holidays & one-off dates and pick "Closed all day" or "Open with different hours".
Yes. Add more than one time range to a day, for example 09:00-12:00 and 13:00-17:00.
Yes. Set a closing time earlier than the opening time, for example 22:00-02:00.
Use the Live Opening Hours block in the editor, or paste one of these shortcodes into a page: [iboh_opening_hours show="table"], [iboh_opening_hours show="status"], or [iboh_opening_hours show="both"].
No. There is no external API and no tracking. Everything runs on your own site. To keep cached pages current, the saved hours, dates, labels, and public notes are included in the page data and evaluated in each visitor's browser. Do not put confidential information in a schedule note.
– show the same characters in the PHP fallback and in the live browser text.<style> tag into the enqueued stylesheet, gated by a small enqueued head script.[iboh_opening_hours] and the bootstrap class is IBOH_Plugin, so every public name carries the plugin prefix.init, so translated defaults no longer trigger the WordPress 6.7+ early-textdomain notice.itboffins-live-opening-hours text domain and package slug.