Write your message
Add the text, an optional link and an optional countdown.
Free tool · Squarespace widget
Add a bar to the top or bottom of every page with a message, a link and an optional countdown. Choose the colours and whether visitors can close it, then paste one snippet into Code Injection.
Plain text only. Anything that looks like HTML is shown as text, not run.
Shown before the message and hidden from screen readers. Up to 8 characters.
Accepts https://, http://, mailto:, tel:, a /page path or an #anchor. A bare domain gets https:// added.
The button fill, or the text colour of an underlined link. Button text switches between black and white automatically.
The bar stays fixed in view while visitors scroll.
Raise it if a menu or header on your site sits on top of the bar.
Adds padding to the page equal to the bar’s measured height. Squarespace fixed or sticky headers are positioned separately and may still overlap the bar, so test it on your live site and adjust the z-index if needed.
0 shows the bar again on every visit. Otherwise the choice is stored in the visitor’s browser. If storage is blocked the bar still works and simply returns on the next page.
Mobile means screens narrower than 768 px.
A small, visible ‘Widget by …’ link. Thanks for keeping it, you can turn it off.
“Visitor’s local time” uses each visitor’s own clock. A fixed UTC offset is the same moment for everyone but does not follow daylight saving changes.
The countdown always hides itself at zero. Checked when the page loads and every second while it is open.
The bar only appears between these moments. Leave a date empty for no limit. A date without a time starts at 00:00. Checked when the page loads.
Links are switched off in this preview. The countdown runs live.
Type a message above to generate your code.
</body> tag of your page or template.Test on your live site once, on desktop and mobile, including how the bar sits against your header. The code is self-contained: it makes no network requests and loads no libraries. If you paste it twice, only one bar appears.
Runs in your browser. Nothing you enter is uploaded or stored.
Add the text, an optional link and an optional countdown.
Colours, position, when it shows, and whether visitors can dismiss it.
One block of code with the styles and script included.
In Squarespace, open Settings, Developer Tools, Code Injection (it may be under Advanced in older versions) and paste it in the Footer box. Code Injection needs a plan that includes it, so check yours. View the live site to see it.
Straight answers about this tool. If yours isn't here, ask me directly.
Code Injection usually shows only on the live site, so open your published page to check it.
It can. Squarespace headers vary by template, so test it on your live site. The tool has an option to push the page down, and you can switch the bar to the bottom instead.
Yes. You can add a close button and choose how many days it stays hidden. That uses the visitor's browser storage, and if it is blocked the bar simply shows again.
Yes. Set a start and end date and the bar appears only between them, in the visitor's browser time.
A small, visible link in the bar that points back to this site. It is on by default and you can switch it off. It is marked nofollow.
The hosting I use
In my experience it's one of the best hosting options for small business websites, and it's the one I suggest. If you sign up through my link, I earn a small commission at no extra cost to you.
These tools are free to use. If your site needs more than an announcement bar, I design and build custom websites for small businesses, and I offer a free audit that shows you what to fix first.