Call Us Toll Free - US & Canada : 888-818-9916 UK : 800-069-8778 AU : 1800-990-217
Add an Announcement Bar or Site Notice

How to Add an Announcement Bar or Site Notice in WordPress (2026)

Spread the love

An announcement bar is a thin strip of text at the top of your site. It tells every visitor one thing, such as a sale, a delay or a change in opening hours. WordPress has no single button for this, but there are several easy ways to add one. This guide covers each of them for 2026. You will see how to add a notice with the Site Editor, with a classic theme, with WooCommerce, with a plugin and with a few lines of code.

What an Announcement Bar Is and When to Use One

A site notice is a short message that shows on every page. It most often sits above the header, though some sites pin it to the foot of the screen. It can hold a line of text, a link and a close button. It is not a popup. A popup covers the page and asks for a click, while a bar sits out of the way and lets people read on.

Use a bar when the news matters to most visitors and has an end date. Good uses are a holiday sale, a shipping cut-off date, a planned outage or a new store address. A bar is a poor home for news that only a few people need. It also loses its pull if it never changes, since repeat visitors learn to skip it. If you need people to act before they can browse, a popup may suit you better. Our guide on how to add a pop-up or banner in WordPress covers that.

How to Add a Site Notice With the Site Editor

If your site runs a block theme, you can build a bar with no plugin at all. A block theme is one that you edit in the Site Editor, such as the default themes that ship with WordPress. The header of a block theme is a template part. Any block you add to that part shows on every page that uses the header.

Step 1: Open the header. Go to Appearance → Editor → Patterns. Under Template Parts, click Header and open the header your site uses.

Step 2: Add a Group block at the top. Click the List View icon in the top bar. Click the three dots next to the first block and pick Add before. Type “group” and add a Group block. It now sits above your logo and menu.

Step 3: Write the message. Add a Paragraph block inside the group. Type your notice and add a link if you need one. Set the text to align center.

Step 4: Style the bar. Click the Group block. In the Styles tab of the side panel, set a background color and a text color. Under Dimensions, set a small padding, such as 8 pixels at the top and bottom.

Step 5: Save. Click Save, then open your site in a new tab. The bar should show on every page. To take it down later, open the same header, pick the Group block and delete it.

How to Add a Notice in a Classic Theme

A classic theme has no Site Editor. You will know you have one if you see Appearance → Customize and Appearance → Widgets in the menu. Classic themes differ a lot, so the bar may live in one of two places. Check both before you reach for a plugin.

Look for a top bar setting. Go to Appearance → Customize and open the Header panel. Many classic themes have a section named “Top Bar”, “Header Top” or “Notice Bar”. Turn it on, type your text and pick the colors. The preview on the right shows the result as you type. Click Publish in the Customizer to make it live.

Look for a header widget area. Go to Appearance → Widgets. If you see an area named “Top Bar” or “Above Header”, add a Paragraph block to it and type your notice. Click Update to save.

If your theme has neither, you still have three routes. You can use a plugin, use the WooCommerce notice if you run a store, or add a small piece of code. Each one is covered below. For wider header changes, see our post on how to customize headers in WordPress.

How to Use the WooCommerce Store Notice

WooCommerce comes with its own site notice, and many store owners never find it. It is called the store notice. It shows a strip of text on every page of the store, with a Dismiss link at the end. When a shopper clicks that link, the bar stays hidden for them until you change the text.

To turn it on with a classic theme, go to Appearance → Customize → WooCommerce → Store Notice. Type your message in the box. You can use plain text and a basic link tag. Tick Enable store notice, check the preview, then click Publish. The bar picks up its colors from your theme. Some themes show it at the top of the page and some at the foot.

The store notice has limits. You get one message, with no start date or end date. You cannot show it on some pages and hide it on the rest. It also relies on a small script and a cookie, so a page cache can show an old message for a while after you edit it. For a quick note such as “Orders placed after 20 December ship in January”, it does the job well. For a timed sale with a countdown, a plugin is a better fit.

How to Add an Announcement Bar With a Plugin

A plugin is the right choice when you want extras. These include a close button, a start and end time, a countdown, or rules for which pages show the bar. Many free plugins do this. Before you install one on a live site, take a backup or try it on a staging copy first. Our guides on how to back up and restore a WordPress site and how to set up a staging site explain how.

Step 1: Find a plugin. Go to Plugins → Add New Plugin and search for “announcement bar” or “notification bar”. Pick one that was updated in the past few months and is tested with your version of WordPress.

Step 2: Install it. Click Install Now, then Activate. Look for the new menu item in the left admin menu or under Settings.

Ad BannerWe fix your Website in less than 30 min

Step 3: Create the bar. Type your message and add a button link if you want one. Choose where the bar sits, top or bottom, and if it should stay in view as people scroll.

Step 4: Set the rules. Choose the pages that show the bar. Set a start and end date if the plugin has that option. Turn on the close button, and set how many days the bar stays hidden once a visitor closes it.

Step 5: Save and test. Save the bar, then view your site in a private window.

How to Add a Site Notice With Code

You can add a bar with a few lines of code and no plugin. This suits a developer, or an owner who wants the leanest set up. The code is a risk if it has a typo, so do not paste it into a live site first. Take a backup, and test on a staging copy. Never edit the files of a parent theme, since the next theme update will wipe your change.

WordPress has a hook named wp_body_open. A hook is a point in the page where your own code can run. This one fires right after the page body starts, which is the ideal spot for a bar. Most themes made since 2019 support it. Your code should attach a small function to that hook. The function prints one line of HTML, which is a div that holds your message. You then add a few CSS rules for the background color, the text color and the padding.

There are two safe homes for this code. The first is the functions.php file of a child theme, at wp-content/themes/your-child-theme/functions.php. Our post on what a WordPress child theme is shows how to make one. The second is a small custom plugin, which keeps the bar in place if you switch themes. If you are not sure which to pick, read functions.php vs a custom plugin. Put the CSS in Appearance → Customize → Additional CSS on a classic theme.

How to Write and Style a Bar People Will Read

The way you build the bar matters less than what it says. A bar has about two seconds to make its point. A few simple rules help it do that, and none of them need a designer.

Keep it to one line. Aim for 90 characters or fewer. On a phone, a long message wraps to three or four lines and pushes your logo down the screen. Say one thing, then link to a page that holds the detail.

Lead with the news. Put the key words first. “Free shipping until Sunday” works. “We are pleased to let you know about our offer” does not.

Make the text easy to see. Use dark text on a light bar or light text on a dark bar. The rule of thumb for body text is a contrast ratio of at least 4.5 to 1. You can check your two colors with any free contrast checker.

Let people close it. A close button shows respect for repeat visitors. Make sure it can be reached with the Tab key and has a label such as “Close notice” for screen readers.

Common Announcement Bar Problems and What to Check

A bar is a small thing, but it sits on every page, so a fault shows up everywhere at once. The issues below are the ones we see most often. Each has a quick check you can run before you change anything else.

The old message still shows. A cache is serving a saved copy of the page. Clear your page cache and any cache at your host, then look in a private window. Our guide on how to clear the WordPress cache lists each layer.

The page jumps as it loads. Some bars are added by a script after the page has drawn. The whole page then shifts down, which hurts your layout shift score. Choose a bar that is part of the page HTML, such as the Site Editor method. If you must use a script bar, pin it to the bottom of the screen so it does not push content.

The bar hides the menu. This happens when both the bar and the header are set to stick to the top. Turn off the sticky option on one of them, or let the bar scroll away with the page.

Need Help Setting Up a Site Notice?

You now have five ways to add an announcement bar in WordPress. Block themes can do it in the Site Editor with a Group block in the header. Classic themes may have a top bar setting or a widget area. Stores can turn on the WooCommerce store notice. A plugin adds timing, page rules and a close button. A short piece of code on the wp_body_open hook gives you the leanest bar of all.

Pick the simplest route that meets your need, keep the message short, and set a date to take it down. If your bar will not show, shifts the page or clashes with a sticky header, the cause is often a cache or a theme setting. If you would like someone to take a look, the team at 24×7 WP Support works on WordPress themes, WooCommerce stores and plugin set up every day. Tell us what you want the notice to do, and we can talk through the options with you.

WP Girl 30 min