Trying to remove announcement bar from homepage only (but keep on product pages).

Trying to remove announcement bar from homepage only (but keep on product pages).

mk331
Visitor
1 0 0

Hi! I'm trying to remove the announcement bar from our homepage only. Using theme called Crave and here is our site: https://www.produce-aisle.com/. I am very new at all things CSS, so any help would be so appreciated! 

 

Thank you! 

MK

Replies 2 (2)

Asad-Mahmood
Navigator
300 51 56

Go to your online store -> edit code -> theme.liquid file and paste this code before closing </body> tag

{% if template == 'index' %}
<style>
.announcement-bar {
    display: none;
}
</style>
{% endif %}


this will remove the announcement bar from home page only

If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp





PageFly-Richard
Shopify Partner
4854 1091 1764

Hi @mk331 

 

This is Richard from PageFly - Shopify Page Builder App

 

Please add this code to your theme.liquid above the </head> to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the </head>

{% if template == 'index' %}
<style>
.announcement-bar-section{
display: none;
}
</style>
{%endif%}

 

Hope this can help you solve the issue 

 

Best regards,

Richard | PageFly 

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.