{"id":40762,"date":"2015-01-15T11:05:58","date_gmt":"2015-01-15T16:05:58","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=40762"},"modified":"2016-04-12T05:45:24","modified_gmt":"2016-04-12T09:45:24","slug":"wordpress-how-to-make-social-icons-open-in-a-new-tab","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/wordpress-how-to-make-social-icons-open-in-a-new-tab.html","title":{"rendered":"WordPress. How to make social icons open in a new tab"},"content":{"rendered":"<p>\r\n<\/p>\r\n<p>This tutorial will show you how to make social icons open in a new tab in WordPress.<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=Da0sTLyCmdY?width=1280&amp;height=720\" rel=\"prettyPhoto\">WordPress. How to make social icons open in a new tab<\/a><\/p>\r\n<ol>\r\n<li>\r\n<p>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:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/11\/screen1_icon_newtab.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/11\/screen1_icon_newtab-300x172.png\" alt=\"screen1_icon_newtab\" width=\"300\" height=\"172\" class=\"aligncenter size-medium wp-image-40763\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/11\/screen1_icon_newtab-300x172.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/11\/screen1_icon_newtab-150x86.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/11\/screen1_icon_newtab-1024x589.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/11\/screen1_icon_newtab.png 1261w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p> 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 <strong>wp-content\\themes\\themeXXXXX\\static\\static-social-networks.php<\/strong> file. Also, you can use WordPress admin panel to edit the file. Log into Dashboard, go to <strong>Appearance -> Editor<\/strong> menu, select <strong>themeXXXXX<\/strong> &#8211; click the file <strong>static-social-networks.php<\/strong>. Locate the following line of code:<\/p>\r\n<pre class=\"brush:php\">\r\necho '&lt;li class=&quot;'.$social_networks[$i].'&quot;&gt;&lt;a href=&quot;'.of_get_option($social_networks[$i]).'&quot; title=&quot;'.$social_networks[$i].'&quot;&gt;\r\n<\/pre>\r\n<p>You will need to add this code <strong>target=&#8221;_blank&#8221;<\/strong> at the end, so it will look as follows below:<\/p>\r\n<pre class=\"brush:php\">\r\necho '&lt;li class=&quot;'.$social_networks[$i].'&quot;&gt;&lt;a href=&quot;'.of_get_option($social_networks[$i]).'&quot; title=&quot;'.$social_networks[$i].'&quot; target=&quot;_blank&quot;&gt;\r\n<\/pre>\r\n<p> Click <strong>Update<\/strong> to save your file:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/11\/screen2_icon_newtab.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/11\/screen2_icon_newtab-300x173.png\" alt=\"screen2_icon_newtab\" width=\"300\" height=\"173\" class=\"aligncenter size-medium wp-image-40764\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/11\/screen2_icon_newtab-300x173.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/11\/screen2_icon_newtab-150x86.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/11\/screen2_icon_newtab-1024x590.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/11\/screen2_icon_newtab.png 1232w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Check your site please. Click on your social icon. You will see the icon is opened in a new tab.<\/p>\r\n<\/li>\r\n<\/ol>\r\n<p>Now you know how to  make social icons open in a new tab.<\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=Da0sTLyCmdY?width=1280&amp;height=720\" rel=\"prettyPhoto\">WordPress. How to make social icons open in a new tab<\/a>\r\n<\/p>\r\n<\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to make social icons open in a new tab in Wordpress.<\/p>\n","protected":false},"author":70,"featured_media":42763,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[728],"tags":[674,617,860,977,1812,2405],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/40762"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/70"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=40762"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/40762\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/42763"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=40762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=40762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=40762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}