Divi's social icons in a new window

How to open Divi footer icons in a new browser window?

Updated on 19/06/24

816 words

3 minutes of reading
29 comments

This article contains affiliate links recognizable by the percentage icon (%) → I am an affiliate link

The Divi theme offers us, as an option, to make appear the social icons at the foot of each page, but how to customize this? How to Open Divi footer icons in a new browser window ? Indeed, the options to display the icons of the Divi footer are basic, this theme does not leave us too many choices: only 4 icons to place at the bottom right and that open in the same tab of the browser! Don't panic, in this article we will see that in two or three clicks, we can change the window opening our links at footer...

1 – Opening of the Divi footer icons: Target concept _Self / Target _Blank

In HTML the tag <a> allows to add a link to a new web page, whether it is a page of your site or a page of an external site. The syntax is as follows:

<a href="https://astucesdivi.com" target="_blank">Mon blog</a>

The href being the destination and the target being the way to get there... That's why there is different values to add to the target attribute – all taken into account by browsers – but we will only keep the main values:

  • _blank : opens the link in a new browser window or tab
  • _self : opens the link in the current window => this is the default

By default, WorPress uses the _self target, maybe without knowing it, you modify this attribute of yourself when you insert a link into the body of your articles. This is exactly what happens when you check the small box below the destination address, look at:

Add a Target Blank in a WordPress link
By checking the small box, you add a Target Blank to the links you insert into your articles.

However, the theme Divi does not offer us such an option when we enter the addresses of our social profiles from the tab Divi > Theme Option > GeneralToo bad.

2 - How to open a new window with the click of an icon in the Divi footer?

If you already use the theme Divi, you must have noticed that icons located in the footer your site or blog did not open in "target blank".

This means that if a visitor to your site clicks on any of the icons located at the bottom of each page, it will leave your site to go to one of your social profiles. This internet user will therefore have left your site and may not return to it, it is the « target self ».

On the other hand, if you had the possibility of him Open your social profiles in a new browser window, maybe this internet user will be tempted to continue reading your article or browsing your site.

To remedy this, it's very simple! You're going to have to add a little bit of code to Divi that will open your social profiles in a new window when internet user clicks on it... Here's this piece of code:

<script type="text/javascript">
jQuery(document).ready(function(){
jQuery(".et-social-icon a").attr('target', '_blank');
});
</script>

3 – Where to insert the code tip to open the Divi footer icons in a new window?

Remember, in one last article, I explained to you that Divi easily enabled code insertion in the "Head" section of your site... So it is precisely here that you will have to add this little script.

Then go to the tab Divi > Theme Options > Integration > Add code line to the Head of your blog

Code to be inserted to open the Divi footer icons in a new window
Code output to be inserted in the "integration" tab of the Divi options to open the Divi footer icons in a new window

Another solution also: if you prefer to integrate this function into your child theme directly, this is also possible. Simply duplicate the file header.php in your child theme and add this piece of code.

To go further...

The fact open the Divi footer icons in a new window is very important as this facilitates browsing and user experience of your player.

If this one is interested in your article, he may be annoyed if he is forced to return to it by clicking on the arrows « back from one page » his navigator.

Plus, it's super important for your internal statistics : if the reader leaves your site after a few seconds, without even visiting another page, it makes your rebound rate => that's not what you're looking for, is it?

How to open in target-blank icons placed in the divi footer

Get Divi

Divi training

Ebook Divi PDF

Free tips

Divi Quiz

Live coaching

icon 256x256

Proudly translated by wpLingua, the translation extension for WordPress That I develop! SEO-Friendly / Automatic / Editable

29 Comments

  1. emmanuelle.audouard
  2. Lycia
  3. Jean-Michel
  4. Lycia
  5. Jean-Michel
  6. Lycia Diaz
  7. Jérôme
  8. Lycia Diaz
  9. Sandrine
  10. Lycia Diaz
  11. Julie
  12. Lycia Diaz
  13. Sandra
  14. Lycia Diaz
  15. Sandra
  16. Olivier.LM
  17. Lycia Diaz
  18. Maud
  19. Lycia Diaz
  20. Maud Colly
  21. Lycia Diaz
  22. Virginie SASSERANT
  23. Lycia Diaz
  24. Yanis Roux
  25. Lycia Diaz
  26. Alain Pons
  27. Lycia Diaz
  28. Frédéric Seignon
  29. Lycia Diaz

Submit a comment

Your email address will not be published. Required fields are indicated with *

This site uses Akismet to reduce undesirables. Learn more about how your feedback data is used.