Is there a way to hide the announcement bars on specific collections

HCoWoodworks
Visitor
1 0 0

Is there a way to hide the announcement bars on specific collections?

 

Using dawn theme.

Reply 1 (1)

gr_trading
Shopify Partner
1674 141 173

Hi @HCoWoodworks 

 

You can create metafield named hideannounement and assign its value to any number and paste the below code in collection-list.liquid file.

 

{% if collection.metafields.custom.hideannounement != blank %}
.announcement-bar {display: none !important;}
{% endif %}

 

Hope it helps... 

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee