Categories

Featured templates

WordPress. How to make social icons open in a new tab

Kristy Smith January 15, 2015
Rating: 5.0/5. From 4 votes.
Please wait...

This tutorial will show you how to make social icons open in a new tab in WordPress.

WordPress. How to make social icons open in a new tab

  1. Please open your website and look for icons on the top. Click, for example, the first icon google+. You will see this icon is opened in the same tab:

    screen1_icon_newtab

  2. In order to open this icon in a new tab, you will need to make some changes in the file. Go to your files (you can use FTP or hosting control panel) and find wp-content\themes\themeXXXXX\static\static-social-networks.php file. Also, you can use WordPress admin panel to edit the file. Log into Dashboard, go to Appearance -> Editor menu, select themeXXXXX – click the file static-social-networks.php. Locate the following line of code:

    echo '<li class="'.$social_networks[$i].'"><a href="'.of_get_option($social_networks[$i]).'" title="'.$social_networks[$i].'">
    

    You will need to add this code target=”_blank” at the end, so it will look as follows below:

    echo '<li class="'.$social_networks[$i].'"><a href="'.of_get_option($social_networks[$i]).'" title="'.$social_networks[$i].'" target="_blank">
    

    Click Update to save your file:

    screen2_icon_newtab

  3. Check your site please. Click on your social icon. You will see the icon is opened in a new tab.

Now you know how to make social icons open in a new tab.

Feel free to check the detailed video tutorial below:

WordPress. How to make social icons open in a new tab

Website Themes for Wordpress
This entry was posted in WordPress Tutorials and tagged icon, new, social, tab, target, WordPress. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket