Opening Divi Social Media Icons in a New Tab

Vivian Maxine - Divi Social Media New Tab

If you ever use Divi to create WordPress, you may have noticed that the social media icons don’t redirect the target to a new tab. That bugs me like no other! Any time I take a user to an external site via a link from my site, I use a _blank target to open the site in a new tab. Unfortunately, Divi does not have anything in the portal interface that allows you to change the target. So we must turn to code:

 

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

 

This simple jQuery fix works like a charm. Happy WordPressing and Divi-ing!

welcome!

welcome!

My name is Vivian and I’m a Las Vegas-based wife and mom to two kids. Learn More

0 Comments

Submit a Comment

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

Explore the Blog

What is Ethyl Alcohol and Is It Safe?

What is Ethyl Alcohol and Is It Safe?

Ethyl alcohol, also known as ethanol, is one of those ingredients you encounter almost daily without even realizing it. It’s in your favorite beer or wine, the hand sanitizer in your bag, and even...

read more