By default, the social links found in your website’s header and footer open in the same tab/window. This can be a huge disadvantage; especially if you don’t want people to navigate away from your website.
This tutorial shows you how you can easily add a snippet of code to Divi’s theme options, which will make the social links open in a new tab when you click on them. So let’s get started!
Step 1:
Log into your WordPress dashboard and click on “Divi” found near the bottom of the sidebar.
Step 2:
Click on the “Integration” tab
Step 3:
Paste the code below in the “body” area
<script type=”text/javascript”>
jQuery(document).ready(function(){
jQuery(“.et-social-icon a”).attr(‘target’, ‘_blank’);
});
</script>
Step 4:
Click “Save Changes” found at the bottom
Your social links should now open in a new tab. I hope you found this snippet of code helpful!
0 Comments