Private: Home › Forums › WordPress Themes › Elvyre – Retina Ready WordPress Theme › Open social icons in new tab › Reply To: Open social icons in new tab
Hello,
Please go to wp-content/themes/elvyre/. Find and open up a file called header.php.
Go to about line 117 where it is written:
<a href="<?php echo esc_url($pi_theme_options['header_social_icons']['text'][$index]) ?>" class="<?php echo $icon ?>"></a>
Make sure you edit that exact line number, or a number around 117 because there are multiple codes like the one above in the header.php file. If you edit the wrong line code, your social links won’t open in new tab.
Okay, once you have identified the correct line, just add the attribute target="_blank"
to the element, like:
<a target="_blank" href="<?php echo esc_url($pi_theme_options['header_social_icons']['text'][$index]) ?>" class="<?php echo $icon ?>"></a>
Your social links will now open in a new tab.
Robert