fbpx

Divi and Extra theme has a feature to add social media icons on header and footer. A user can specify social media URLs from the Theme settings page and the respective icon appears on footer or header based on the display setting specified in the Customizer.

The social media icons links, however, open in the same window and thus a user navigates away from the website after clicking the social icons. In order to avoid a visitor dropout because of the Divi and Extra theme social icons opening in the same window, the code snippet provided below can be added to the section.

Divi and Extra both have the option to insert a script tag in website head which can be done from the theme options under the Integration tab and Add code to the < head > of your blog section. It can also be done by putting the code in header.php if a child theme is used.

Open social icon links in new window – Code snippet for Divi theme


The code snippet will be added as shown in the following image.
Divi Social Icons in New Window

Open social icon links in new window – Code snippet for Extra theme


The code snippet will be added as shown in the following image.
Divi Social Icons in New Window

The above solution for Divi and Extra theme is tested to work and open social media links in new tab/window for header and footer.