Skip to main content
How to Create a Promo Bar in Divi

Learn how to use Divi’s built-in features, including the Theme Builder to design and implement a promo bar.

Updated over 5 months ago

A promo bar effectively highlights special offers, announcements, or important messages on your website. Creating a promo bar in Divi allows you to maintain control over your site's performance and design.

In this article, we will guide you through the process of creating a custom promo bar in Divi.

Create the design for your promotional bar in Divi Theme Builder

  1. Go to WordPress Dashboard → Divi → Theme Builder

  2. Create a Global Header area, or edit your existing one

    Divi Theme Builder

  3. Insert a new section - which will be the container of the Promo bar - it should be the first section in your layout

  4. Open the Section's setting by clicking on the Gear icon

  5. Go to the Content Tab → Background → Background color and set a background color for the entire Section

  6. Go to the Design Tab → Spacing and set the Top and Bottom Padding to 5px - change this value to your liking

  7. Go to Advanced Tab → CSS ID & Classes → CSS ID and type divi-promo-bar

    Icon Module - CSS ID

  8. Add a 1 Column Row

  9. Add the Text module and the Icon module

    Section - Module Layout

  10. Open the Icon module's settings by clicking on the Gear icon

  11. Go to Advanced Tab → CSS ID & Classes → CSS ID and type divi-close-bar

    Icon Module - CSS ID

  12. Design the Text module and the Icon module to fit your needs

  13. Edit the Row setting by clicking on the Gear icon

  14. Go to the Design Tab → Sizing and:

    1. Enable the option Use Custom Gutter Width

    2. Set the Gutter's value to 0

  15. Go to the Design Tab → Spacing and set the Top and Bottom Padding to 0

  16. Go to the Content Tab and click on the Gear icon for the Column

  17. Go to Advanced Tab Custom CSS Free Form CSS and add this CSS Code:

    selector {
    display: grid;
    grid-template-columns: auto 30px;
    align-items: center;
    }

  18. Go to Divi → Theme Option → Integration tab → Header and add this JS code:

    <script>
    (function ($) {
    $(document).ready(function () {
    var promoBar = $('#divi-promo-bar');
    var closeIcon = $('#divi-close-bar');
    closeIcon.on('click', function () {
    promoBar.hide();
    })
    });
    })(jQuery)
    </script>

  19. Go to Divi → Theme Options → General Tab → Custom CSS and add this CSS code:

    #divi-close-bar:hover {
    cursor: pointer;
    }

The result can be seen in the GIF below:

Create a Promo Bar with Theme Builder
Did this answer your question?