Display announcement bar on shop page only

Topic summary

A user wants to display the announcement bar exclusively on shop/collection pages in the Impulse theme, rather than site-wide.

Initial Solution Proposed:

  • Create a custom announcement-bar.liquid section with conditional logic to show only on collection/index templates
  • Include CSS styling for positioning and appearance
  • Integrate the section into the theme file where desired

User’s Preference:
The user prefers keeping the existing Impulse theme announcement bar instead of building a new custom section.

Current Challenge:
The theme’s built-in announcement bar toggle (found in Theme Settings > Header) controls visibility across all pages. When enabled, it appears site-wide rather than being limited to shop pages only.

Status: The discussion remains open with no solution yet provided for conditionally displaying the native announcement bar on specific pages only.

Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

I just want the announcement bar on the shop page (collections, whatever) so I can say we ship nation-wide.

On the Impulse theme.

Hi,

create a section called “announcement-bar.liquid” and add code


    

We ship nation-wide!

Style with css

#announcement-bar {
    background-color: #f8d7da; /* Background color */
    color: #721c24; /* Text color */
    padding: 10px;
    text-align: center;
    font-size: 16px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Ensure it stays on top of other elements */
}

modify theme.liquid and include code where you want the announcement bar to appear

{% if template contains 'collection' or template == 'index' %}
  {% section 'announcement-bar' %}
{% endif %}

Thanks. I like the current announcement bar on the Impulse Theme though. Surely there’s a way to make that show without creating a new one?

click on Theme Settings > Header > Look for an option to enable the announcement bar. It might be a toggle or a checkbox

The toggle is there, yes, but when it is toggled on it toggles on for all pages. I only want it on the shop page, not the other pages.