Solved

How To Hide Announcement Bar From HomePage Only?

SamShuter
Tourist
10 0 3

Hi there, 

 

I am looking for a way to hide the announcement bar as well as the cart on my Shopify homepage. Ideally, I would want both to only appear on the product page. 

 

I'm using Pipeline theme. 

 

Thank you!

Accepted Solution (1)
Moeed
Shopify Partner
3531 890 1106

This is an accepted solution.

Hey @SamShuter 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

 

<style>
a.navlink.navlink--cart {
    display: none !important;
}
</style>

 

RESULT:

Moeed_0-1704734693637.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

Need a Shopify developer? Chat on WhatsApp


- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
Canva to Shopify in clicks - Free App

View solution in original post

Replies 10 (10)

Moeed
Shopify Partner
3531 890 1106

Hey @SamShuter 

 

Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.

 

Best Regards,
Moeed

Need a Shopify developer? Chat on WhatsApp


- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
Canva to Shopify in clicks - Free App
SamShuter
Tourist
10 0 3

Thank you! 

 

I figured out how to hide the announcement bar, now I just need to hide the cart. 

 

my URL is: https://samarashuter.shop/

Moeed
Shopify Partner
3531 890 1106

This is an accepted solution.

Hey @SamShuter 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

 

<style>
a.navlink.navlink--cart {
    display: none !important;
}
</style>

 

RESULT:

Moeed_0-1704734693637.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

Need a Shopify developer? Chat on WhatsApp


- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
Canva to Shopify in clicks - Free App
SamShuter
Tourist
10 0 3

Amazing, thank you!

Moeed
Shopify Partner
3531 890 1106

Thank you for your reply. I'm glad to hear that the solution worked well for you. If you require any more help, please don't hesitate to reach out. If you find this information useful, a Like would be greatly appreciated.

Need a Shopify developer? Chat on WhatsApp


- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
Canva to Shopify in clicks - Free App
lolohuman
Visitor
1 0 0

Hey Moeed,

How do I hide the header announcement bar when I'm in cart.

I use the Dawn Theme.

 

Thanks in advance!

Abdosamer
Shopify Partner
820 146 161

Hi @SamShuter , can you share your store url?

Buy me a Coffee
Email : abdelrahamansamer71@gmail.com
Chat on WhatsApp
Profolio
SamShuter
Tourist
10 0 3

Thank you! 

 

I figured out how to hide the announcement bar, now I just need to hide the cart. 

 

my URL is: https://samarashuter.shop/

 

Abdosamer
Shopify Partner
820 146 161

Hi @SamShuter , go to theme.liquid and add the following code before the </body> tag :

 {% if template == "index" %}
     <style>
     a.navlink.navlink--cart {
    display: none !important;
}

   </style>
  {% endif %}

This will hide the cart only on homepage. 

Buy me a Coffee
Email : abdelrahamansamer71@gmail.com
Chat on WhatsApp
Profolio
SamShuter
Tourist
10 0 3

This works perfectly, thank you!