How to add Shopify Announcement bar (without an app)

How to add an announcement bar on your Shopify store (without an app)

The Shopify announcement bar is an excellent way to promote a special discount offer, a sale, or another type of promotion at the top of your Shopify store. And there’s no need to pay a monthly fee for this feature. Simply paste a few lines of code into your theme and you’re done.

This free Shopify announcement bar also allows you to display an optional “free shipping countdown,” so customers can always see how close they are to receiving free shipping.

Now these days eCommerce websites have many announcement. So they need to notify user about announcements. Like: –

  • Highlight a recently released product
  • Advertise a special or promotion
  • Weather delay or holiday hours
  • Promote upcoming new products
  • Offer a free giveaway or download
  • Share news about a recent award or certification

Also Read: How to create customizable products in Shopify without an app

Adding an Shopify announcement bar on store

Step-1. Open the theme editor in Shopify.

Login to you Shopify admin pane, and found the option under Online Store > Themes > Actions > Edit code.

Please refer below screenshot

Shopify Announcement bar

Step-2. Add a new Section for announcement bar

Take a look in the left-hand sidebar of your theme editor. Click “Add a new section” under the “Sections” header. Enter the name “announcement-bar” in the popup that appears.

Make sure to delete the Shopify default code in your new section. Please refer below image

Shopify Announcement bar

Step-3. Paste announcement bar code

Select all the below code, then copy and paste the code into your new section.

Now your screen should now look like blow screenshot:

Shopify Announcement bar

Step-4. Open theme.liquid in your theme editor

Take a look in the left-hand sidebar of your theme editor. You’ll find theme.liquid inside the Layout folder.

Shopify Announcement bar

Step-5. Add one line of code inside theme.liquid file

Inside theme.liquid, and search for the following code:

{% section ‘header’ %}

It might be called something else depending on your theme, but it probably has the word “header” in it. Some other common names are:

{% section ‘general-header’ %}

{% section ‘dynamic-header’ %}

Just above this code, copy and paste the following:

Refer the below image, updated code should look like this:

Shopify Announcement bar

Step-6. Open your theme settings and set up your announcement bar

Now open your theme settings (Online Store > Themes > Customize), and you’ll see a new section titled “Announcement bar.” Please refer the below images

Shopify Announcement bar (without an app)
Shopify Announcement bar (without an app)

Hey, Now you can set up the announcement message, colors, font size, link, and an option to add promotion content or free shipping countdown.

add Shopify Announcement bar (without an app)

Step-7. Open or Refresh your website

Now open or refresh your website and look the view of Shopify announcement bar.

Step-8. Congratulations!

Congratulations! the announcement bar code is now installed and your new Shopify announcement bar is live!!.

Wrapping Words

Well, This tutorial provide you complete steps to add Shopify Announcement bar (without an app). I hope you found this tutorial helpful for your project. Keep learning!.

Having trouble? Are you want to get implementation help, or modify or extend the functionality of this script? Submit a paid service request

Related posts