Make social media icons open new tab

How can you make the social media icons open a new tab when they are clicked so the visitors aren’t redirected off the site?

thanks.

Hi,

Please post a link to your website, to the page where you have the social icons you would like to be opened in a new tab, so I can check.

Kind Regards,
Csaba

Hi, thanks for the reply.

My site is currently locally hosted on my machine so I can’t link it to you.

But my social icons are implemented by using the AT Social Icon widget.

Thanks.

Hi,

If you can please post a link to the demo, to the page where you see the icons setup like you have it on your website.

Kind Regards,
Csaba

Yes, sure.

Here’s the link
http://demo.athemes.com/hiero/

thanks.

Hi,

In inc / widgets / widget-social-icons.php, line 144 please add target="_blank" to this code:

<li class="widget-si-<?php echo $athemes_widgets_name; ?>"><a href="<?php echo $athemes_widgets_field_value; ?>" title="<?php echo $athemes_widgets_title; ?>"><i class="ico-<?php echo $athemes_widgets_name; ?>"></i></a></li>

like this:

<li class="widget-si-<?php echo $athemes_widgets_name; ?>"><a href="<?php echo $athemes_widgets_field_value; ?>" title="<?php echo $athemes_widgets_title; ?>" target="_blank"><i class="ico-<?php echo $athemes_widgets_name; ?>"></i></a></li>

and let me know how it works.

Kind Regards,
Csaba