All Collections
FAQ's and Troubleshooting
How To Open The Social Links In A New Tab/Window
How To Open The Social Links In A New Tab/Window

Have the social icons open in a new window for both Divi and Extra

Cristi avatar
Written by Cristi
Updated over a week ago

The Divi Theme

The social icons in Divi's header and footer are opening in the same window by default. If you'd like to change that and have them open in a new tab instead, please add the following code in Divi > Integration > Add code to the < body > (good for tracking codes such as google analytics):

<script>
(function($) {
    $(document).ready(function() {

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

The Extra Theme

Same process but with a different code. Add the following in Extra > Integration > Add code to the < body > (good for tracking codes such as google analytics):

<script>
(function($) {
    $(document).ready(function() {

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