Skip to content

  • Home
  • About Us
  • Add-ons
  • Services
    • Shopify Development Services
    • Shopify Maintenance services
    • Shopify PageSpeed Optimization
    • Shopify Training
    • Shopify App Development
    • Shopify App Integration Services
    • Shopify Email Marketing
    • Shopify Web Design Agency
  • Blog
  • Contact Us
  • Search button

How to Create & Add an announcement bar on your Shopify store to boost sales.

May 17, 2022Nov 15, 2022
Create announcement bar Shopify to boost sales

Step 1: Create Section

Login into the admin panel. Go to Online Store > Themes. Click on Actions > Edit Code. Please check the following screenshot for reference:

Go to Sections. Click on Add a new section and then Create a new section called “announcement-bar“. Please check the following screenshot for reference:

Step 2: Add the following code in the section file “announcement-bar.liquid”

{% if section.settings.show_topbar %}
  <div class="section-topbar" style="color:{{ section.settings.topbar_text_color}}; background:{{ section.settings.topbar_bg_color}}">
    {% if section.settings.topbar_link %}
        <a href="{{ section.settings.topbar_link }}" style="color:{{ section.settings.topbar_text_color}}">{{ section.settings.topbar_text}}</a>
    {% else %}
    	{{ section.settings.topbar_text}}
    {% endif %}
  </div>
{% endif %}

{% if section.settings.show_topbar %}
<style>
.section-topbar {
    padding: 10px 0;
    text-align: center;
}
</style>
{% endif %}

{% schema %}
  {
    "name": "Announcement Bar",
    "settings": [
  		{
          "type": "header",
          "content": "Top Bar"
        },
        {
          "type": "checkbox",
          "id": "show_topbar",
          "label": "Show Top Bar",
          "default": true
        },
        {
          "type": "text",
          "id": "topbar_text",
          "label": "Text"
        },
        {
          "type": "url",
          "id": "topbar_link",
          "label": "Top Bar Link"
        },
        {
          "type": "color",
          "id": "topbar_bg_color",
          "label": "Top Bar Color",
          "default": "#000"
        },
        {
          "type": "color",
          "id": "topbar_text_color",
          "label": "Text",
          "default": "#fff"
        }
    ]
  }
{% endschema %}

Step 3: Include section in theme.liquid file. Please check the following screenshot for reference:

Create announcement bar on Shopify

Step 4: Edit the Customize settings to show the Announcement Bar.

Go to Online Store > Themes > Customize. It will show you all the sections. You will see “Announcement Bar” section at the top. Please see the following screenshot for reference:

Create announcement bar on Shopify

The Announcement Bar section. It will show you the content settings and you can manage is easily. Please see the following screenshot for reference:

Create announcement bar on Shopify

At last, Click on Save button. That’s it! Now you know how to boost sales with announcement bar Shopify.

Posted in Shopify Tutorials

Post navigation

Prev How Product pages – Allow pre-orders for products
Next How to Add a Featured Collections Page to Your Shopify Store

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Latest Posts

  • Shopify Flow
    Unlock the Power of Shopify Flow: Automation Strategies for eCommerceDec 8, 2023
  • shopify liquid, custom liquid shopify, shopify liquid cheat sheet, how to add image in shopify liquid, shopify liquid button code, shopify liquid tutorial
    Everything You Need to Know About Shopify LiquidNov 20, 2023
  • best shopify themes for conversion, yuva theme shopify, impulse theme, retina theme shopify, shopify focal theme, drop shopify theme, stiletto shopify theme
    Maximizing Revenue: 7 Best Shopify Themes for Conversion Rates that SoarNov 13, 2023
  • dropshipping business ideas
    Terrific Dropshipping Business Ideas for 2024Nov 6, 2023

Subscribe Now

Follow Us

  • facebook
  • twitter
  • instagram
  • linkedin2

OriginateWeb.com is the realization of a dream. Our founder previously spent several years working for a large website development company.

Quick Links

  • Shopify Services
  • About Us
  • Shopify Theme Add-ons
  • Blog
  • Contact Us
  • Careers

Services

  • Shopify Theme Add-ons
  • Website Development
  • Page Speed Optimization
  • App Development
  • Maintenance
  • Training

Need Help?

  • Licensing Agreement
  • Terms and Conditions
  • Privacy Policy
  • Sitemap
  • facebook
  • twitter
  • instagram
  • linkedin2

© 2023 Originate Web. All Rights Reserved