By default, when you click on social media links in the header or footer, these links open in the same window. For easier navigation and user behaviors, need socials links open in a new tab instead of the same window. It’s very easier to do and amazing interface by Elegant Themes. So you can do it yourself with simple tips.

divi theme social links open in new tab

Hello friends, I’m Pankaj from the beautiful city Chandigarh located in North India.

Today I’ll guide you on how to set up social links open in the new tab. Please follow the steps:

1.) Once logged in your WordPress dashboard, hover your mouse on “Divi” on the left-hand side. Once you hover, click on “Theme Options

2.) After land on your “Theme Options” page, navigate to the “Integration” tab.

3.) Copy the below code and paste into <Head> block and make sure that the “Header” block is enabled.

JavaScript for social links open in new tab

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

$('.et-social-icons .et-social-icon a').attr( 'target', '_blank');

});
})(jQuery);
</script>

4.) Click on “Save Changes“. That’s it.

Try these steps and the link of your social in the header and footer will be open in the new tab.

For Extra Theme

If you’re using Extra theme on your website, so the same process for open social links in a new tab. Just add the following Javascript code in theme <Head> block:

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

});
})(jQuery);
</script>

I hope this snippet of code is helpful!

Next, you can learn about Blogger vs WordPress Comparison – Which Is Best With Pros and Cons

For more information and assistance in the Divi theme or WordPress tools, you can check out our blogs or email me.