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

Topic summary

Goal: Show the Announcement bar only on the Home page in the Shopify Spotlight theme.

Proposed solution (technical):

  • Edit theme code: Online Store > Themes > Edit Code.
  • Locate the Announcement bar in Sections/announcement-bar.liquid or Snippets/announcement-bar.liquid.
  • Wrap the bar’s code with a Liquid conditional so it renders only on the Home (index) template:
    {% if template.name == ‘index’ %}
    …announcement bar code…
    {% endif %}
  • Liquid is Shopify’s templating language; template.name == ‘index’ targets the homepage.

Additional actions:

  • Two responders requested the store URL (and password if enabled) to review. The store URL provided: nevermindthen.com. No password was shared.
  • One responder offered further help via email.

Status:

  • No confirmation from the original poster that the change worked.
  • Discussion appears open. The provided code snippet is central to implementing the solution.
Summarized with AI on December 12. AI used: gpt-5.

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