We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How to display specific announcement bars on one page only?

Solved

How to display specific announcement bars on one page only?

ScentedCozy
Tourist
7 0 2

i have 2 announcements bars i made that i only want on 1 specific page but it is showing on all my pages. can anyone help with this?

Accepted Solution (1)
Dan-From-Ryviu
Shopify Partner
12073 2359 2539

This is an accepted solution.

My mistake, please update code to this 

{% if collection.handle != 'deodorizing-powder' %}
<style>
#shopify-section-sections--21674540335406__cfbc8c96-fb81-492e-b46c-18a8d8c0c42f,
#shopify-section-sections--21674540335406__8241898b-16d2-4d5b-8944-176a207060a9 {
display: none !important;
}
</style>
{% endif %}

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

View solution in original post

Replies 12 (12)

Dan-From-Ryviu
Shopify Partner
12073 2359 2539

Hi @ScentedCozy 
Could you drop your store URL and the page URL that you want announcement bar appear?

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

ScentedCozy
Tourist
7 0 2

store:  https://scentedcozyco.com/ 

 

page i want it on :   https://scentedcozyco.com/collections/deodorizing-powder

 

the 2 pink ones are what i want only on the attached page. all other announcement bars are fine as is. 

Dan-From-Ryviu
Shopify Partner
12073 2359 2539

Go to Online store > Themes > Edit code, open theme.liquid file, add this code after <head> tag

{% if collection.handle != 'deodorizing-powder' %}
#shopify-section-sections--21674540335406__cfbc8c96-fb81-492e-b46c-18a8d8c0c42f,
#shopify-section-sections--21674540335406__8241898b-16d2-4d5b-8944-176a207060a9 {
display: none !important;
}
{% endif %}

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

ScentedCozy
Tourist
7 0 2

here? right after head and before <Meta?

 

Screen Shot 2023-11-30 at 8.50.00 PM.png

Dan-From-Ryviu
Shopify Partner
12073 2359 2539

Yes, it correct

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

ScentedCozy
Tourist
7 0 2

that did not work and it also added this to the top of my home page. 

 

Screen Shot 2023-11-30 at 8.54.03 PM.png

Dan-From-Ryviu
Shopify Partner
12073 2359 2539

This is an accepted solution.

My mistake, please update code to this 

{% if collection.handle != 'deodorizing-powder' %}
<style>
#shopify-section-sections--21674540335406__cfbc8c96-fb81-492e-b46c-18a8d8c0c42f,
#shopify-section-sections--21674540335406__8241898b-16d2-4d5b-8944-176a207060a9 {
display: none !important;
}
</style>
{% endif %}

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

ScentedCozy
Tourist
7 0 2

just to be clear, do i hit enter to start a new line or add it directly after <head> 

Dan-From-Ryviu
Shopify Partner
12073 2359 2539

Both will work

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

ScentedCozy
Tourist
7 0 2

thank you! worked great! 

Dan-From-Ryviu
Shopify Partner
12073 2359 2539

You are most welcome.

 

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

Smeelah
Navigator
374 1 119

Hi @Dan-From-Ryviu ,

 

I've been playing around with this. But I wonder if it's possible to use this type of coding to restrict one announcement to one collection while also not allowing the general announcements to show on that one collection?

 

For example, I have a retail shop with one wholesale collection. I want only the wholesale announcement to show on that collection, but not anywhere else. 

 

Thanks in advance for any help:)

Leila

 

https://leilacools.com/

    {% if collection.handle != ‘wholesale-items’ %}
<style>
#shopify-section-sections--20249337626933__jL4J4E,
#shopify-section-sections--20249337626933__rmK3da {
display: none !important;
}
</style>
{% endif %}