Does anyone have a code for a looping slider in the announcement bar?
Topic summary
Initial Request & Solution:
A user requested code for a looping slider in the announcement bar. PageFly-Victor provided a detailed three-step implementation guide:
- Create a new section called “hura-announcement-bar” in the Shopify theme’s Sections folder
- Add the section to the header by inserting code before the header section script in theme.liquid
- Configure the new sliding announcement bar in the theme customizer
The solution includes complete code snippets for creating a customizable announcement bar with autoplay, color settings, and transition delay options.
Follow-up Issues:
- AlexYZ_1 reported alignment problems on both desktop and mobile (content appearing right-aligned instead of centered), requesting adjustments to match kawaiibo.com’s announcement bar style
- waynetu suggested adding CSS box-sizing code at the beginning of the announcement bar liquid file
- From_The_Stork successfully implemented the solution but requested additional features:
- Ability to set custom height
- Adding clickable links within the text (e.g., to signup pages)
- Adjusting vertical positioning as text appears too close to header and content below
The discussion remains open with styling and enhancement requests pending.
Hi @Joost_1
This is Victor from PageFly - Shopify Page Builder App
You will need to add a custom code for the announcement bar to your theme. Please follow my steps below
Step 1: Create a new section
- From your Shopify admin, go to Online Store > Themes.
- Click Actions, and then click Edit Code.
- Under the Sections folder, click on Add a new section link to create a new section.
- Fill the section name – hura-announcement-bar into the field on the dialog and click Create section button.
- In the online code editor, please replace the existing code with the below code
{%- if section.blocks.size > 0 and section.settings.show_announcement_bar -%}
{%- for block in section.blocks -%}
{{block.settings.message}}
{%- endfor -%}
Powered by HuraTips.Com
{%- endif -%}
{% schema %}
{
"name": "Announcement Bar",
"settings": [
{
"type": "checkbox",
"id": "show_announcement_bar",
"label": "Show"
},
{
"type": "checkbox",
"id": "autoplay",
"label": "Autoplay"
},
{
"type": "text",
"id": "delay",
"label": "Delay between transitions (in ms)",
"default": "5000"
},
{
"type": "color",
"id": "colorBackground",
"label": "Background color",
"default": "#ffffff"
},
{
"type": "color",
"id": "colorText",
"label": "Text color",
"default": "#000"
}
],
"blocks": [
{
"type": "header",
"name": "Message",
"settings": [
{
"id": "message",
"type": "textarea",
"label": "Message"
}
]
}
]
}
{% endschema %}
Click Save.
Step 2: Add the section to the header
- Under the Layout folder, click onto theme.liquid to open file editor.
- In the online code editor, find the script{% section ‘header’ %} and insert the below code before this script.
Step 3: Create a new Sliding Announcement Bar
Hope this can help you solve the issue
Best regards,
Victor | PageFly
Hi, @PageFly-Victor I use your code but it does not align well in the middle more on the right side on desktop and mobile. Can you check if you can make a announcement bar like kawaiibonjour.com?

hi reviving this topic
- ive done these steph thank you very much - working perfectly
a couple of advancements if possible?
-
can the height be set at all? - the text is a little close to the header and content below
-
can links be added to the text to take you to the sign up page for instance
TIA




