How to remove announcement bar from the homepage only?

Topic summary

A user seeks to hide the announcement bar exclusively on the homepage while keeping it visible on all other pages of their Shopify store.

Solution Provided:

  • Navigate to Actions > Edit code > layout > theme.liquid
  • Locate the </head> tag
  • Insert CSS code that targets the announcement bar with display: none when the page type is ‘index’ (homepage)
  • Uses Liquid templating: {%- if request.page_type == 'index' -%} to conditionally apply the styling

Outcome:
The solution successfully resolved the issue. The user confirmed the code worked as intended, allowing the announcement bar to remain visible on all pages except the homepage.

Summarized with AI on October 30. AI used: claude-sonnet-4-5-20250929.

I would like to remove this announcement bar from the home page but keep it on all of the other pages.

Any help is greatly appreciated!

url: https://www.tansokr.com/

2 Likes

Hi @gavboy555 ,

Please go to Actions > Edit code > layout > theme.liquid file, find ‘’ tag and add code here:

Code:

{%- if request.page_type == 'index' -%}
      
{%- endif -%}
1 Like

It worked thanks so much!

1 Like

Hi @gavboy555 ,

You’re welcome and happy to help :blush: