The announcement bar appears on every page - DAWN theme

Hey Shopify community,

For some reason the announcement bar began to appear on every page on my site, which causes issues with the rest of the content. This is not native to the DAWN theme which causes issues.

It should only be on the home page, can someone locate where the issue is and help me change it so it will only appear on the home page?

My theme is the newest DAWN theme

The site is: https://ittiba.dk/

Thank you in advance

1 Like

Hi @Marcus4411

You can remove announcement bar from other page by adding this code before tag in your Online store > Themes > Edit code > theme.liquid file

{% if template == 'index' %}

{% else %}

{% endif %}
1 Like

@Dan-From-Ryviu Thank you, but there is still the same issue with the other pages where the headline is only displayed in half, as you can see on this page https://ittiba.dk/policies/terms-of-service and some of the other policy pages etc. aswell. I think this was due to some code making the announcement bar appear on every page, adding the code you provided, might not solve the issue at its root, which causes this issue still.

Hello There,

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find Layout > theme.liquid and paste this at the bottom of the file:
{% if template != 'index' %}
  
{% endif %}

Hello @ZestardTech i want to remove the announcement bar from other pages, not change the color of it…

1 Like

Hi @Marcus4411 I saw you added code and announcement bar only appear on homepage for now.

Hello @Dan-From-Ryviu yes but as i stated in the message following that, i linked to a policy page where the issue has remained, the header of the page is only visible for the half of it. This has not been an issue previously

Hello There,

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find Layout > theme.liquid and paste this at the bottom of the file:
{% if template != 'index' %}

{% endif %}

Did you select Sticky header option is Always on your theme customize?

@ZestardTech on mobile the announcement bar is not visible, only half of it is cropped, can you help with this?

@Dan-From-Ryviu on mobile the announcement bar is not visible, only half of it is cropped, can you help with this?

Yes this doesnt make any difference

Hi Dan,

I use two announcement bars, one above and one below the header. Is it possible to keep the one above the header but have the one below the header only appear on the home page? Thank you!