Store Notice

Estimated reading time: 6 min

Free shipping this week, a sale that ends on Friday, holiday delivery cut-off dates. These are the things every visitor should see, on every page, before they start browsing. The Store Notice is a thin bar pinned to the very top edge of your site that carries one short message, and it can be dismissed by the visitor so it does not nag them on every page.

WooCommerce ships this bar, and Rey replaces its plain version with one that follows your site’s design and sits inside the header rather than floating over the page.

What you need

The Store Notice needs WooCommerce active. It is part of a module that is turned on by default, so in most cases there is nothing to switch on.

If the Store Notice page is missing from your settings, go to Rey Theme › Modules and look for Store Notice (Promo Header Bar), then turn it on.

Where to find it

Go to Rey Theme › Settings, open the WooCommerce area, then click Store Notice in the list on the left.

the Theme Settings screen on the Store Notice page, with the notice enabled and a short message filled in.

The settings

Enable store notice

The master switch. Off by default, and while it is off nothing else on this page has any effect on your site.

This one option belongs to WooCommerce rather than to Rey, so it is the same setting you would have found in the old Customizer. Turning it off does not erase your message, it only hides the bar.

Store notice

The message itself. Keep it to one line. The bar is thin by design, and a long sentence wraps and pushes your header down.

WooCommerce prefills this with a placeholder about the site being a demo store. Replace that text before you enable the bar, otherwise your customers read a message meant for developers.

You can use basic HTML here, so a link works:

Free shipping on orders over 50. <a href="/shop/">Shop now</a>

Links inside the bar inherit the bar’s own text color and are underlined, so they stay readable whatever colors you pick below.

Close Style

How the visitor dismisses the bar. Three choices:

  • Default, the word Dismiss as a small text link, right after your message.
  • Close Icon (Inside), a small × icon in the same spot, right after your message.
  • Close Icon (Outside), a × icon pinned to the far right edge of the bar, away from the text.

Pick Close Icon (Outside) when your message is long enough that a dismiss link next to it looks like part of the sentence. On narrow screens this option falls back to the inline position automatically, because there is no room at the edge on a phone.

Dismiss as close

Typography

Font family, size, weight, line height, letter spacing and text transform for the message. The bar starts at a small 12px, which suits a single short line.

If you raise the font size, raise the Height below as well, otherwise the text crowds the edges of the bar.

Text Color

The message color. Leave it empty and the bar uses your site’s accent text color, which is the color Rey already picked to sit readably on your accent.

Background Color

The bar’s background. Leave it empty and it uses your site’s accent color.

Setting only one of the two colors is the usual way to end up with an unreadable bar. If you change the background, check the text against it.

Height

The minimum height of the bar, from 0 to 300px, at 32px by default.

This is a minimum, not a fixed height. A message too long for one line still wraps and makes the bar taller. Set it to 0 and the bar shrinks to whatever the text needs.

Three things worth knowing

A dismissal is remembered per message, not per visitor. When someone closes the bar, the browser remembers that specific message as dismissed. Change the wording, even slightly, and the bar comes back for everyone, including the people who already closed it. This is useful: to re-show a bar you do not need to do anything special, just write the new message.

The bar lives inside your header. It is not a separate floating strip, it is rendered at the top of the header itself. So it scrolls the way your header scrolls, and with a sticky header the notice travels with it. When someone dismisses the bar, Rey recalculates the header height so nothing jumps or leaves a gap.

It is one message, site wide. There is no scheduling, no second message, and no per page targeting. If you need a bar that changes by page, or several rotating messages, build it as a Global Section instead and assign it where you want it.

Example: a free shipping bar for one week

  1. Go to Rey Theme › Settings › WooCommerce › Store Notice.
  2. Turn Enable store notice on.
  3. In Store notice, replace the placeholder text with Free shipping on all orders this week. <a href="/shop/">Shop now</a>.
  4. Set Close Style to Close Icon (Outside), so the message reads as one clean sentence.
  5. Leave Text Color and Background Color empty for now, so the bar picks up your accent.
  6. Set Height to 36px to give the line a little more air.
  7. Click Save, then open your shop in a new tab to check it.

When the week is over, come back and turn Enable store notice off. Your message stays saved for next time.

For developers

The bar’s markup passes through WooCommerce’s woocommerce_demo_store filter. Rey builds its own markup on that filter at priority 20, so hook later than 20 or your changes are overwritten.

For styling, these are the classes to target:

  • .woocommerce-store-notice, the bar itself, carries the background.
  • .woocommerce-store-notice-content, the centered inner container, carries the text.
  • .woocommerce-store-notice__dismiss-link, the dismiss link or icon.

The bar’s inner container is capped at your site’s container width. To let it span the full window:

.woocommerce-store-notice-content {
	max-width: none;
}

To rename the dismiss link without a translation file:

add_filter( 'gettext_rey-core', function( $translated, $text ) {
	return 'Dismiss' === $text ? 'No thanks' : $translated;
}, 10, 2 );

Put PHP snippets in your child theme’s functions.php or in a snippets plugin, and CSS in Rey Theme › Settings › Additional CSS or your child theme’s stylesheet. Never edit the parent theme or the plugin, an update overwrites your changes.

The alternative: a dismissable banner built in Elementor

The Store Notice is deliberately plain. One line of text, one bar, one site wide message. When that is not enough, and you want an image, a button, two lines of copy or a banner that only shows on certain pages, build it in Elementor instead and give it the same dismiss behaviour.

Rey adds a Hide on demand option to every Elementor Section and Container. Turn it on and the block gets a close button, and once a visitor closes it, it stays closed for as long as you choose.

How to set it up

  1. Edit the page with Elementor, or create a Global Section if you want the banner site wide.
  2. Build the banner as a normal Section or Container. Any content, any styling.
  3. Select that Section or Container, open the Advanced tab, and find Hide on demand.
  4. Turn Enable hiding on demand on.
  5. Set Hidden state duration to how long a dismissal should last.
  6. Update, then open the page in a normal browser tab to try it.
The Elementor editor with a Section selected, the Advanced tab open and the Hide on demand panel expanded, showing Enable hiding on demand switched on.

The options

Enable hiding on demand turns the whole thing on. Everything below it appears only once this is on.

Hiding Type decides what the visitor clicks:

  • Close Icon adds a small × button to the block for you. This is the usual choice.
  • Custom link uses a link you place inside the banner yourself, so the dismiss can be a button reading “No thanks” or “Got it”. Point that link at #close-section and Rey wires it up.

Close Icon Color, Close Icon Size, Close Icon Thickness and Close Icon – Side distance style the built in × button, and appear only for Close Icon. Thickness controls how heavy the two strokes look, starting at 12. Side distance is how far the icon sits from the edge of the block.

Close Icon Position puts the × on the Left or the Right, at Right by default.

Hidden state duration is how long a dismissal lasts: None (show on refresh), 1 Day, 1 Week or 1 Month, at 1 Day by default. Pick None while you are still designing, so you do not have to keep clearing your browser to see the banner again.

Delay appearance holds the banner back for a moment after the page loads, in milliseconds. Leave it empty and it waits one second. Raise it if you want the page to settle before the banner slides in.

Three things worth knowing

The banner slides in, it is not there on first paint. It stays hidden until the delay passes, then it opens. That is what keeps it from flashing on screen before your styles load, but it does mean the banner is never the very first thing on screen.

A dismissal is remembered in that browser only. It is stored in the visitor’s own browser, per banner, for the duration you set. The same person on their phone sees it again, and so does anyone who clears their browser data. There is no server side record of who dismissed what.

In the Elementor editor the banner is always visible. The close button does nothing there, on purpose, so you can keep editing a banner you have already dismissed on the front end.

One limit for Custom link: Rey wires up the first #close-section link it finds on the page. If you put two custom link banners on the same page, only the first one closes properly. Use Close Icon for the second, or split them across pages.

Which one should you use

Use the Store Notice when the message is one line of text, applies to the whole site, and you want it live in under a minute.

Use an Elementor banner with Hide on demand when you need a design, an image or a button, when you want the banner on some pages only, or when you want to control how long a dismissal lasts.

You can also combine them: a Store Notice for the permanent shipping message, and a separate Elementor banner for a campaign that runs for two weeks.

If the Hide on demand panel is missing in Elementor, go to Rey Theme › Modules and check that Hide on Demand Elementor Sections & Containers is on. There is more about it, alongside Rey’s other Elementor additions, in Rey theme custom Elementor features.

Was this article helpful?