How To Hide Announcement Bar From HomePage Only?

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!

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

Hi @SamShuter , can you share your store url?

1 Like

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/

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/

1 Like

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 tag


RESULT:

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

Best Regards,
Moeed

1 Like

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

{% if template == "index" %}
     
  {% endif %}

This will hide the cart only on homepage.

1 Like

This works perfectly, thank you!

1 Like

Amazing, thank you!

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.

1 Like

Hey Moeed,

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

I use the Dawn Theme.

Thanks in advance!