Hide Header, Announcement bar, and footer on Landing page

Hi altogether!

After lots of research and a few mental breakdowns, I came to the conclusion to ask here for help.

I want to hide my header, announcement bar and footer only on the main page/ home page or however you want to call it.

I’m using the Origin theme.

I was able to hide the header already with this code added above the in the theme.liquid :

{% if template.name == “index” %} .section-header { display: none !important; } {% endif %} {% if handle contains ‘about-us’ %} .section-header { display: none !important; } {% endif %} {% if handle contains ‘shop’ %} .section-header { display: none !important; } {% endif %}

Now I thought I could be smart and just exchange .section-header for either .section-announcement_bar, announcement.bar, or announcement-bar

Neither of those worked. :confused:

Same with the footer I copied the code above and below and changed .section-header to .section-footer (I also deleted the other if-then logics)

Neither works. Any help would be appreciated ?? thank you!

Hi, @abmhr
I am familiar with this issue. Please share your store url(password). Thanks.

Hi @abmhr ,

Please change code:

{% if template.name == "index" %} 
 
{% endif %} 
{% if handle contains 'about-us' %} 
 
{% endif %} 
{% if handle contains 'shop' %} 
 
{% endif %}

Hi! Thank you! Unfortunately this only works partially for the Header and Announcement bar. The footer probably needs to be added somewhere else since its not part of the “Header” itself. Any thoughts? I tried to put this line of code, underneath the as well.
Thank you!

Hi @abmhr ,

Please add code:

{% if template.name == "index" %} 
 
{% endif %} 
{% if handle contains 'about-us' %} 
 
{% endif %} 
{% if handle contains 'shop' %} 
 
{% endif %}
1 Like

Thank you! But unfortunately, this only works partially for the header and announcement bar. Footer is still shown…

Hi @abmhr ,

Can you send me the store link? I will check it for you

You’re a genius! Thank you, I really appreciate it! :heart:

Hi @abmhr ,

If you have any questions, you can contact me directly.
Happy to help you :blush:

1 Like

The second one you sent was the solution! Thank you lots!