Make announcement bar to be visible only on homepage

Make announcement bar to be visible only on homepage

Eli90
Pathfinder
125 4 15

Hi,

 

I would like my announcement bar to be visible only on my homepage (www.sugarfreeeu.com), does anyone know how can I make it happen ? dawn theme

thank you in advance !

Replies 4 (4)

ZestardTech
Shopify Partner
5636 1031 1359
Hello There,
 
1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find layout >theme.liquid and paste this at the bottom of the file:

 

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

 

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing
mmaevemmm
Tourist
8 0 2

This worked for me thanks.

ZestardTech
Shopify Partner
5636 1031 1359

Thank you for your response. It's good to know that it's worked for you. Kindly feel free to get back to me if you need any further assistance.
If helpful then please Like and Accept Solution.

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing

BSS-Commerce
Shopify Partner
3477 463 527

Hi @Eli90 

You can follow this suggestion

Go to theme => edit code, then find the "{% section 'announcement-bar' %}" in the theme.liquid file:

BSSCommerce_0-1684738706551.png

 

then you edit the above code to the following code: "{% if request.path == "/" %} {% section 'announcement-bar' %}{% endif %}"

BSSCommerce_1-1684738718770.png

 

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency