Solved

Show a specific announcement bar for a specific URL

drew_ward
Tourist
8 1 1

Hi Folks:

 

Does anybody know how to implement logic that shows a specific announcement bar but only for a selected page.   The announcement bar then would not be shown for other pages.

 

Thanks,

 

Drew

Accepted Solution (1)

oscprofessional
Shopify Partner
15843 2371 3073

This is an accepted solution.

Hello @drew_ward 

This guide will be helpful to you; please refer to it -

https://www.shopify.com/in/partners/blog/shopify-announcement-bar

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing

View solution in original post

Replies 7 (7)

StevieW
Shopify Partner
12 1 6

Hi Drew

 

https://shopify.dev/api/liquid/objects#request

 

Use 'request.path'. Something like 

{% if request.path includes <your string> %}
    ...do stuff
{% endif %}

 

Not tested, but you get the idea.

 

 

drew_ward
Tourist
8 1 1

Thank you.  

KetanKumar
Shopify Partner
36843 3636 11978

@drew_ward 

oh sorry for that issue can you please share store url

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

PaulNewton
Shopify Partner
6275 573 1323

You would basically need to either make a custom announcement bar section that changes things based on the logic that detects the page.

Or make an alternate theme.liquid layout then modify those pages to use that layout with a different announcement bar.

 

Either way generally and advanced theme customization.

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


drew_ward
Tourist
8 1 1

Thank you Paul.

oscprofessional
Shopify Partner
15843 2371 3073

This is an accepted solution.

Hello @drew_ward 

This guide will be helpful to you; please refer to it -

https://www.shopify.com/in/partners/blog/shopify-announcement-bar

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing
drew_ward
Tourist
8 1 1

Thank you.    I'll review the link.