Skip to main content
How to Open the Social Media Links in a New Tab/Window

Learn to adjust social media link settings in Divi/Extra, modify HTML code, and use custom attributes to open them in a New Tab or window.

Updated over 3 months ago

Opening social media links in a new tab or window ensures visitors remain on your site while exploring your social media profiles.

This practice can help increase user engagement and keep your audience connected to your content.

Open the Social Media links in a new browser tab or window using the Divi theme

The social icons in Divi's header and footer are open in the same window by default. To change that, follow these steps:

  1. Go to WordPress Dashboard → Divi → Theme Option → Integration tab → Header

  2. Copy/Paste this JS code:

    <script>
    (function ($) {
    $(document).ready(function () {
    $('.et-social-icons .et-social-icon a').attr('target', '_blank');
    });
    })(jQuery);
    </script>

Open the Social Media links in a new browser Tab or Window using the Extra theme

  1. Go to WordPress Dashboard → Extra → Theme Option → Integration tab → Header

  2. Copy/Paste this JS code:

    <script>
    (function ($) {
    $(document).ready(function () {
    $('.et-extra-social-icons .et-extra-icon').attr('target', '_blank');
    });
    })(jQuery);
    </script>
Did this answer your question?