Re: How To Hide Announcement Bar From HomePage Only?

Solved

How To Hide Announcement Bar From HomePage Only?

SamShuter
Shopify Partner
17 0 4

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
5436 1471 1757

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 Specialist? Chat on WhatsApp

- Custom Design | Advanced Coding | Store Modifications


View solution in original post

Replies 10 (10)

Moeed
Shopify Partner
5436 1471 1757

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 Specialist? Chat on WhatsApp

- Custom Design | Advanced Coding | Store Modifications


SamShuter
Shopify Partner
17 0 4

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
5436 1471 1757

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 Specialist? Chat on WhatsApp

- Custom Design | Advanced Coding | Store Modifications


SamShuter
Shopify Partner
17 0 4

Amazing, thank you!

Moeed
Shopify Partner
5436 1471 1757

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 Specialist? Chat on WhatsApp

- Custom Design | Advanced Coding | Store Modifications


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
895 163 183

Hi @SamShuter , can you share your store url?

SamShuter
Shopify Partner
17 0 4

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
895 163 183

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. 

SamShuter
Shopify Partner
17 0 4

This works perfectly, thank you!