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:
Go to WordPress Dashboard → Divi → Theme Option → Integration tab → Header
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
Go to WordPress Dashboard → Extra → Theme Option → Integration tab → Header
Copy/Paste this JS code:
<script>
(function ($) {
$(document).ready(function () {
$('.et-extra-social-icons .et-extra-icon').attr('target', '_blank');
});
})(jQuery);
</script>