How to hide the announcement bar on the homepage in Dawn theme?

Hello,

I am using Shopify Dawn theme. How is it possible to hide the announcement bar on the homepage only?

Many thanks,

{% if template.name == 'index' %}
  
{% endif %}

Please paste this code

Thank you for sharing. Where should I place that code?

Hey @AZ2024

Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.

Best Regards,
Moeed

hey @AZ2024 ,

go to the edit code on your time, and search for file theme.liquid
in your file press ctr+f to find this tag, paste it before ending of this .

{% if template contains 'index' %}
  
{% endif %}

Hi @AZ2024

This is Richard from PageFly - Shopify Page Builder App

Please add this code to your theme.liquid above the to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the

{% if template contains 'index' %}
  
{% endif %}

Hope this can help you solve the issue

Best regards,

Richard | PageFly