PrestaShop announcement bar: a message at the top of every store page
An announcement bar in PrestaShop is a thin strip with one sentence above the store header, visible on every page. You can add it in three ways: in the theme settings, with a module from Addons, or in a child theme template with a few CSS rules. What matters most is a short, true sentence that's readable on a phone.
Author: The TellMyShop team. A guide for PrestaShop store owners: the cause, the manual fix and the same work in a chat conversation.
Last updated: · 7 min read
What is a message bar at the top of the page for?
For one piece of information that changes a customer's decision before they start looking for a product. The customer sees the bar on the home page, in a category, on the product page and in the cart, so they don't have to land on a specific page to find something out.
Typical bar messages:
- the free delivery threshold (“Free delivery on orders over €49”),
- the shipping cut-off (“Orders placed by 14:00 ship the same day”),
- a break in shipping (“Orders from the long weekend ship on Tuesday”),
- the last day to order before the holidays.
The amounts and times in these examples are illustrative. Only put in the bar what's actually set up in the store. When the bar promises free delivery over €49 and the carrier in the cart only gives it from €60, the customer feels cheated at the last step. We describe how to set the threshold itself in our post on free shipping over a set amount.
Three ways to add an announcement bar in PrestaShop
Choose a method based on how often you change the text and which theme you have.
| Method | When it fits | What to watch out for |
|---|---|---|
| Theme settings | your paid theme has a “top bar” field | if you change theme, the bar disappears with the settings |
| A bar module from Addons | you change the text often, or want a schedule or several versions | one more module to update; check it's compatible with your store version |
| An entry in a child theme template | one fixed message, changed a few times a year | changing the text means changing a theme file |
PrestaShop has a spot at the top of the page meant for banners. The developer documentation describes it under the displayBanner hook as “the very top of every page”. Bar modules usually hook in there. You can see which modules sit in that spot in your store under Design → Positions, explained in the guide to module positions.
A template entry goes in a child theme, not the main theme. If you add the bar to the main theme's files, the next theme update will remove it. The PrestaShop documentation on child themes describes how a child theme is built. We explain what happens to changes after an update in our post on how a theme update wiped my changes.
How to add the bar in the template step by step
This route needs access to the theme files. If you don't work with files day to day, do it with someone who does, or with the chat.
- Check whether the store has a child theme. If not, create one before you change the first file.
- Make a copy of the theme's header file (in Classic, the page header template).
- Add one block above the header with the message text and your own class, for example
top-info-bar. - In the child theme's
custom.cssfile, set the background colour, text colour, a small font size and centring. - Add a rule for narrow screens so the text wraps instead of running off the screen.
- Clear the cache in Advanced Parameters → Performance.
- Open the store in a private window and on a phone. Check the home page, a category, a product page and the cart.
In a store with several languages, text hard-coded into the template shows in one language to everyone. In that case a module with a field for each language, or text through the theme translations, is more convenient.
What should the bar look like on a phone?
On a phone the bar takes valuable space above the product, so it has to be low. Two lines is the limit. Three lines push the product name and price down the screen.
What to pay attention to:
- Contrast. White text on a light background, such as yellow, is hard to read in sunlight. Choose a dark background with light text, or the other way round.
- Font size. Customers pinch to zoom text that's too small. Small, but no smaller than the rest of the fine print in the store.
- No scrolling text. Moving text is hard to read and tiring on the eyes.
- A close button only with memory. If the bar can be closed, it should stay closed on the following pages. Otherwise the customer closes it again on every page.
- A separate rule for narrow screens. On a phone, reduce the spacing and let the text wrap. You put that rule in a block that only applies below a chosen screen width, described in MDN's guide to media queries.
How to look after the bar once it's added
A bar nobody watches soon starts telling lies. The promotion has ended, the delivery threshold has changed, and the old text is still hanging at the top of the store. Customers read it as a promise.
Three simple rules:
- whenever you change delivery prices or shipping times, check the bar too,
- remove or replace a seasonal message on the day the campaign ends, not a week later,
- when there's no message, don't leave an empty coloured strip; hide the bar completely.
If the bar looks wrong on a phone, we cover the fix separately in our post on the PrestaShop mobile view. You can change the colours of buttons and other elements by following our post on changing a button colour.
How to add an announcement bar with the chat
You write what message you want and how it should look. Your chat (Claude or ChatGPT) checks the theme, works out whether there's a child theme and whether a module with a similar bar is already running in the top spot of the page. Then it shows the change to the files before saving.
You: Add a thin bar at the very top of every page: “Free delivery on orders over €49”. Dark background, small text, centred.
Your chat: I checked the delivery settings: free delivery is set from €49 including tax, so the text is correct. There's already a child theme. I'll add the bar above the header and the styles in custom.css:
Before saving I'll make a copy of both files, then clear the cache and check the home page.
You: Yes.
Your chat: Saved. The bar is on the home page and the product page. On a phone it fits on one line.
old version: (no bar)
new version: <div class="top-info-bar">Free delivery on orders over €49</div>
new version: .top-info-bar { background: #1f2937; color: #fff; font-size: 13px; text-align: center; padding: 6px 12px; }
When you no longer need the bar, you ask for it to be removed the same way. The chat restores the files from the copy or removes just the block, also with a preview. There's an example request in the use case a message bar across the whole site.
Changes to theme files work in TellMyShop Pro with the Theme switch on in the module panel. The switch lasts 24 hours and requires a database backup made the same day. Every change goes into the change history, and you can undo most changes with one request. In the free TellMyShop Free version the chat reads the store reports and gives advice, but saves nothing. The versions are compared in the pricing, and you'll find other guides on store design on the blog.
Questions and answers
Does PrestaShop have a built-in announcement bar?
The Classic theme has no separate module for a thin text bar above the header. There are spots at the top of the page where a module or theme can insert one. Many paid themes have a bar in their settings, so look there first.
What should I write in the announcement bar?
One sentence that helps people buy right now: the free delivery threshold, the last shipping date before the holidays, a break in shipping over a long weekend. Not several messages at once and no scrolling text. On a phone the sentence should fit on one line, two at most.
Will an announcement bar slow down my store?
Plain text with a few CSS rules has practically no effect on speed. Heavy bar modules with animations, countdowns and their own scripts can slow things down. When you only need a sentence and a background colour, a simpler solution is enough.
How do I change the bar text after a promotion ends?
It depends on how the bar was made. A bar from a module or theme settings is changed in its configuration. A bar added to the theme template is changed in the file, so with TellMyShop Pro you need the Theme switch for that. The chat shows the old and new content before saving.
Will TellMyShop Free add an announcement bar?
No. The free TellMyShop Free version only reads store reports and saves nothing. Adding a bar is a theme change, which TellMyShop Pro makes once you turn on the Theme switch for 24 hours.
PrestaShop is a registered trademark of PrestaShop SA. Claude is a trademark of Anthropic PBC. ChatGPT and OpenAI are trademarks of OpenAI. TellMyShop is not affiliated with these companies.