Shopify themes, liquid, logos, and UX
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
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?
Solved! Go to the solution
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.
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.
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.
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.
here? right after head and before <Meta?
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.
that did not work and it also added this to the top of my home page.
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.
just to be clear, do i hit enter to start a new line or add it directly after <head>
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.
thank you! worked great!
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.
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
{% if collection.handle != ‘wholesale-items’ %}
<style>
#shopify-section-sections--20249337626933__jL4J4E,
#shopify-section-sections--20249337626933__rmK3da {
display: none !important;
}
</style>
{% endif %}