How to hide announcement bar fro HomePage only but have it in all other shop pages?

Solved
Highlighted
Excursionist
15 0 3

Hi,

 

My home page will be traded more as a landing page so I want to hide the announcement bar but only from the home page. I still want to have it in all the other pages.

Can someone please share the code to do this & were to include it? 

I am using the theme Prestige.

 

Thanks so much in advance,

Cristina C. 

0 Likes
Highlighted
Shopify Partner
2400 520 668

Hey @NDS,

Please share your website URL. I will check and provide a solution here.

Thanks!

If helpful then please Like and Accept Solution.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes
Highlighted
Excursionist
15 0 3

Hi,

 

Thanks for replying. The thing is that the theme I am editing is not live yet, I have another one running currently. 

www.newdaysports.com

I want to hide from the home page only the announcement bar that says "Free 2-Business Day Shipping on Orders Over $59.99" & I want it to still show in all the other pages.

 

Hope this makes sense! Thanks!!!!

 

CC

0 Likes
Highlighted

@NDS 

Try putting the following style in your development theme's CSS/SCSS file:

body.template-index #shopify-section-header .announcement-bar {
  display:none;
}

 

This should only hide it for the index/home page.

 

1 Like
Highlighted
Excursionist
15 0 3

Thanks!

 

Pasted it at the end of the theme.liquid but it did not work.

0 Likes
Highlighted

Sorry @NDS , that first snippet would have to be in your theme's CSS or SCSS file. If pasting into theme.liquid you could try this instead:

<style>
body.template-index #shopify-section-header .announcement-bar {
  display:none;
}
</style>

 

1 Like
Highlighted
Excursionist
15 0 3

@ImmersiveEC  thanks for getting back so fast. However, tried both in the theme.liquid and in the scss but didn't work.

Maybe I didn't something wrong or if for a different theme? 

https://www.newdaysports.com/

 

Thanks so much!

0 Likes
Highlighted

Ah bummer @NDS 
The store is password protected, shoot me the password and I'll take a look. 

0 Likes
Highlighted
Excursionist
15 0 3

@ImmersiveEC  

Thanks again!

0 Likes
Highlighted

This is an accepted solution.

Sorry @NDS , I must have been flying blind without the link. Try this, it should work.

 

<style>
body.template-index #shopify-section-header  {
  display:none !important;
}
</style>

 

 

 

0 Likes