Show a specific announcement bar for a specific URL

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

1 Like

Hi Drew

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

Use ‘request.path’. Something like

{% if request.path includes 

Not tested, but you get the idea.

@drew_ward

oh sorry for that issue can you please share store url

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.

Hello @drew_ward

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

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

1 Like

Thank you.

Thank you Paul.

Thank you. I’ll review the link.