marquee announcement

Topic summary

Main issue: keep a marquee/announcement bar visible only on the homepage; existing code changes aren’t taking effect.

  • Store details shared: https://3f7da4-e5.myshopify.com (password may be required if enabled).
  • Proposed solutions:
    • Wrap the announcement bar code with a conditional in the theme files: {% if template == ‘index’ %} … {% endif %} so it renders only on the home (index) template. Suggested files: header.liquid or theme.liquid.
    • CSS fallback: hide #shopify-section-marquee by default, then display it only when template == ‘index’ by placing CSS inside the conditional.
    • Placement guidance: add the conditional right after the tag in theme.liquid if needed.
  • Note: One snippet shared contained only the conditional wrapper; the actual announcement bar markup must be inside it to work.

Latest update: the user reports the code still doesn’t work and offers collaborator access for direct assistance.

Status: Unresolved/ongoing. Awaiting hands-on access or theme-specific troubleshooting to identify why the conditional/CSS isn’t applying.

Summarized with AI on December 21. AI used: gpt-5.

Im having trouble on keeping the marque announcement header on the front page only, ive tried with the code and it isn’t responding.

Hi @ragrobot1 , I hope you are doing well, kindly share your store URL. Thanks!

Hi @ragrobot1

Could you share your store link so I can give you the code to do that?

Hey @ragrobot1

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

https://3f7da4-e5.myshopify.com here is my store url thank you.

  1. Go to Online Store → Theme → Edit code.

  2. Put the below code in the header.liquid or index.liquid, whatever name you have.

{% if template == ‘index’ %}

// here your code for announcement bar

{% endif %}

or the below code if above doesn’t works:
Please add this code after the head of theme.liquid or index.liquid file:

#shopify-section-marquee { display: none; }

{% if template == ‘index’ %}

#shopify-section-marquee { display: block !important; }

{% endif %}

If my reply helpful, kindly click like and mark it as an accepted solution.

Thanks!

Hi @ragrobot1

Please add this code to theme.liquid file, after in Online Store > Themes > Edit code


{% if template == 'index' %}

{% endif %}

hello I have tried and its still not responding, can I send you a collaborator code for help

hello I have put the code in and it wont work, can I send you a collaborator code for help