By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.

How to Add an Announcement Bar to Your Webflow Site

Matt Ward Photo
Matt Ward
7 mins

An announcement bar is a simple yet highly effective way to communicate important updates and engage your audience. Whether you're directing traffic to key pages, sharing time-sensitive promotions, or collecting leads, an announcement bar provides valuable real estate to help achieve your marketing goals.

By leveraging Webflow’s CMS and design tools, you can create an announcement bar with a countdown timer and manage its content directly from a CMS collection.

Here’s how to set it up.

Why Use an Announcement Bar?

An announcement bar is not just for service updates—it’s a versatile tool that can benefit your marketing strategy:

  • Direct Traffic to Key Pages: Use the announcement bar to guide visitors to landing pages for seasonal campaigns, new product collections, or signup forms.
  • Highlight Time-Sensitive Updates: Announce promotions, discounts, or limited-time offers to create urgency. Share major news, such as product launches or event details.
  • Collect Leads: Promote downloadable content, such as e-books, guides, or other lead magnets, with a clear call-to-action to capture email addresses or other details.

Step 1: Create a CMS Collection for the Announcement Bar

The first step is to create a CMS collection to manage your announcement bar content. This gives you or your marketing team complete control over what’s displayed.

  1. Go to your Webflow project and navigate to the CMS Collections panel.
  2. Create a new collection and name it something like "Announcement Bar."
  3. Add the following fields to the collection:
    • Heading (Plain Text): For the main announcement message.
    • Link (Link): To direct users to the relevant page.
    • Countdown Timer End Date (Date/Time): To add urgency with a countdown.
    • Visibility (Switch): To toggle the announcement bar on or off.
  4. Add a few sample items to the collection for testing purposes.

Step 2: Design the Announcement Bar in Webflow

Next, design the announcement bar using Webflow’s visual tools.

  • Add a Section for the Announcement Bar:
    • Drag a new Div Block into your page. Position it at the top of your site and give it a class name like announcement-bar.
    • Style it with a background colour, padding, and typography to match your site’s design.
  • Bind the Content to the CMS Collection:
    • Add a Text Block inside the announcement bar and bind it to the "Heading" field from your CMS collection.
    • Add a Button or Link Block and bind it to the "Link" field.
  • Add a Countdown Timer:
    • Use Webflow’s built-in elements or embed custom code for a countdown timer.
    • Bind the timer’s end date to the "Countdown Timer End Date" field in your CMS collection.
  • Here’s a simple JavaScript snippet to add dynamic countdown functionality:
<script>
document.addEventListener('DOMContentLoaded', function () {
    const timerElement = document.querySelector('.countdown-timer');
    const endDate = new Date(timerElement.getAttribute('data-end-date')).getTime();

    function updateTimer() {
        const now = new Date().getTime();
        const timeLeft = endDate - now;

        if (timeLeft > 0) {
            const days = Math.floor(timeLeft / (1000 * 60 * 60 * 24));
            const hours = Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
            const minutes = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60));
            const seconds = Math.floor((timeLeft % (1000 * 60)) / 1000);

            timerElement.innerHTML = `${days}d ${hours}h ${minutes}m ${seconds}s`;
        } else {
            timerElement.innerHTML = 'Time is up!';
        }
    }

    updateTimer();
    setInterval(updateTimer, 1000);
});
</script>
  • Add an Attribute:
    • Add a Text Block or Span element in your announcement bar and give it a class like countdown-timer.
    • Use the data-end-date attribute to pass the countdown end date dynamically from your CMS field.
  • Add a Visibility Toggle:
    • Use conditional visibility to show or hide the announcement bar based on the "Visibility" switch in your CMS collection.
  • Add a Visibility Toggle:
    • Use conditional visibility to show or hide the announcement bar based on the "Visibility" switch in your CMS collection.

Step 4: Publish and Test

Once the design and CMS setup are complete, publish your site and test the announcement bar:

  1. Preview how the bar appears on different devices (desktop, tablet, and mobile).
  2. Verify that the countdown timer works correctly and updates dynamically.
  3. Check the conditional visibility to ensure the bar only displays when the visibility switch is toggled on.

Tips for Maximising the Impact of Your Announcement Bar

  • Keep It Concise: Use short, impactful messaging to grab attention quickly.
  • Create Urgency: Leverage the countdown timer for time-sensitive offers or events.
  • Track Performance: Use UTM parameters in the link field to measure clicks and engagement.
  • A/B Test Messages: Rotate different announcements to see which ones drive the most conversions.

By following these steps, you’ll create a flexible and impactful announcement bar that you can easily update through the Webflow CMS.

This approach not only saves time but also ensures your site’s most valuable real estate is working to support your marketing goals.

Spend Less Time on Webflow, More Time on Marketing
Don’t let Webflow tasks slow you down. I provide expert support to help your site run smoothly while you focus on delivering impactful marketing campaigns.