Zum Inhalt springen

FAQ

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Yes. Notice declares Requires Plugins: woocommerce and WC requires at least: 8.0. If WooCommerce is not active, Notice does not boot and shows an admin notice instead. It also needs WordPress 6.5+ and PHP 8.1+.

At the very top of every front-end page, printed at the theme’s wp_body_open hook (priority 5). Most modern themes fire this hook. If your theme does not, the bar will not appear, that is the one thing to check first if nothing shows.

It renders only when it is enabled and the message is non-empty. An enabled bar with an empty message stays off, and so does a saved message with the switch off. If both are set and it still does not show, the theme is probably not calling wp_body_open.

Yes, with a small safe-HTML allow-list: <strong>, <b>, <em>, <i>, <a> (with href, title, target, rel), <span> and <br>. Anything outside the list is stripped on save.

It is position: sticky and stays pinned to the top of the viewport as the shopper scrolls. There is no static/scroll-away option.

Yes, when Dismissible is on (the default). The choice is stored in the visitor’s browser with localStorage, no cookies and no personal data, and you set how many days it lasts (0 = forever). If localStorage is blocked, the close button still hides the bar for the current page view.

The bar re-shows for everyone, including shoppers who closed the old one. The dismissal is remembered under a key that includes a hash of the message text, so a new message no longer matches the stored key.

Yes. Set background, text and accent colours with a live preview. They are written as the --notice-bg, --notice-fg and --notice-link CSS custom properties on the bar, so you can also override them from your theme stylesheet.

Can I schedule the bar to start and stop on a date?

Section titled “Can I schedule the bar to start and stop on a date?”

No. There is no built-in schedule. You enable and disable the bar manually, or use the notice/bar_active filter in code to gate it on your own condition (including a date check). See Using the announcement bar.

Not from the settings screen, but yes from code. The notice/bars filter lets a developer register additional bars; each renders if it passes the enabled/message check and notice/bar_active. Stacked bars sit one above the other.

No. The bar is placed automatically at the top of the page; there is nothing to embed in content.

Notice renders templates/bar.php from the plugin directly, there is no theme-override path. Customise the look with the --notice-* CSS custom properties and your theme stylesheet, or filter the bar’s settings with notice/bars and notice_sanitize_settings.

No. The CSS loads only when the bar is active, and the dismissal script loads only when the bar is also dismissible. A disabled bar enqueues nothing. The markup is plain HTML with no front-end framework or jQuery, and there is no layout shift beyond the bar’s own height.

Yes. The bar is an ARIA region (role="region" with a label), the close button is keyboard operable with a focus-visible outline and an accessible label, and dismissing the bar moves focus to <body> so keyboard users are not stranded. Motion (the “on air” pip, the first-reveal light sweep and the collapse animation) is disabled under prefers-reduced-motion.

Deleting the plugin from the Plugins screen runs the uninstall routine, which removes the notice_settings and notice_db_version options. Notice creates no custom tables and stores nothing outside your own database.