FAQ
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Does Notice require WooCommerce?
Section titled “Does Notice require WooCommerce?”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+.
Where does the bar appear?
Section titled “Where does the bar appear?”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.
Why isn’t the bar showing?
Section titled “Why isn’t the bar showing?”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.
Can I format the message?
Section titled “Can I format the message?”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.
Is the bar sticky or does it scroll away?
Section titled “Is the bar sticky or does it scroll away?”It is position: sticky and stays pinned to the top of the viewport as the shopper scrolls. There is no static/scroll-away option.
Can shoppers close the bar?
Section titled “Can shoppers close the bar?”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.
What happens when I change the message?
Section titled “What happens when I change the message?”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.
Can I match my brand colours?
Section titled “Can I match my brand colours?”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.
Can I show more than one bar?
Section titled “Can I show more than one 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.
Is there a shortcode or block?
Section titled “Is there a shortcode or block?”No. The bar is placed automatically at the top of the page; there is nothing to embed in content.
Can I edit the template?
Section titled “Can I edit the template?”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.
Does it slow down my store?
Section titled “Does it slow down my store?”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.
Is it accessible?
Section titled “Is it accessible?”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.
How do I remove all plugin data?
Section titled “How do I remove all plugin data?”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.