Help with showing Announcement bar on only one page using Spotlight Theme

I am looking for a solution to how do I show my Announcement bar only on the Home page of the Spotlight Theme.

Hey @_nevermindthen ,

To show the Announcement bar only on the Home page of the Spotlight theme, you can achieve this with a simple Liquid conditional statement. Here’s how to do it:

Follow these Steps:

  1. Online Store > Themes > Edit Code

  2. Locate the announcement bar code:

  • In the code editor, find the file responsible for the Announcement bar. It’s usually located in:
Sections/announcement-bar.liquid

or

Snippets/announcement-bar.liquid
  1. Add a Conditional Statement:

Wrap the Announcement bar code with a Liquid conditional to ensure it only displays on the Home page:

{% if template.name == 'index' %}
  
{% endif %}

Save and Preview:

Preview your store to confirm that the Announcement bar is visible only on the Home page.

To address this efficiently, please send me a message via email so I can help you in detail. I’d love to assist you with my 5 years of experience and ensure everything is resolved perfectly.

Looking forward to hearing from you!

Best regards,
Rajat Sharma

Hey @_nevermindthen

Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.

Best Regards,
Moeed

Hi @_nevermindthen , kindly provide your store URL please and if it is password protected, please share the password as well. Thanks

thanks

thank you