Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi all,
Does one know how to delete the header and the bar only on my landing page?
My URL is https://hobot-japan.com/pages/hobot-2s
Thank you in advance!
Solved! Go to the solution
This is an accepted solution.
You can simply add css code to hide them.
1: Online store > themes > Actions > Edit code > Layout > theme.liquid
2: paste code before '</head>'
{% if page.handle == 'hobot-2s' %}
<style>
sticky-header, #shopify-section-announcement-bar {
display: none!important;
}
</style>
{% endif %}
Hi @harukajmickey ,
To remove announcement bar from landing page use below conditional statement in theme.liquid
To get the theme.liquid follow below steps
{%- if request.page_type != 'index' -%}
{% section 'announcement-bar' %}
{%- endif -%}
Thank you Hari1_prasad! Where exactly do I need to put these codes?
This is an accepted solution.
You can simply add css code to hide them.
1: Online store > themes > Actions > Edit code > Layout > theme.liquid
2: paste code before '</head>'
{% if page.handle == 'hobot-2s' %}
<style>
sticky-header, #shopify-section-announcement-bar {
display: none!important;
}
</style>
{% endif %}
Hi Kani!
Thank you. It worked!
Hi Kani,
If I add the codes like this to apply to other pages, it didn't work. Do you know the way?
{% if page.handle == 'hobot-2s' or 'hobot388' %}
Thank you in advance.
It should be
{% if page.handle == 'hobot-2s' or page.handle == 'hobot388' %}
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025