{"id":51868,"date":"2015-08-11T01:44:41","date_gmt":"2015-08-11T05:44:41","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=51868"},"modified":"2016-05-09T02:54:12","modified_gmt":"2016-05-09T06:54:12","slug":"wordpress-how-to-add-icons-for-social-links-when-they-are-set-with-text","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/wordpress-how-to-add-icons-for-social-links-when-they-are-set-with-text.html","title":{"rendered":"WordPress. How to add icons for social links (when they are set with text)"},"content":{"rendered":"<p>This tutorial will show you how to add icons for social links in WordPress (when they are set with text by default).<\/p>\r\n<p>\r\n<a href=\"http:\/\/www.youtube.com\/watch?v=0PmsZaTK248?width=1280&amp;height=720\" rel=\"prettyPhoto\">WordPress. How to add icons for social links (when they are set with text)<\/a><\/p>\r\n<p>Social links may be represented either with the text or with icons. In some templates the links show up as text and there is no option to replace the text with icons in WordPress dashboard:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_1.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_1-300x169.jpg\" alt=\"wordpress_how_to_add_an_icons_for_social_links_1\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-51869\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_1-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_1-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_1.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>This may seem a real problem if you don&#8217;t have a roadmap to what should be done. That&#8217;s why we&#8217;re happy to present you this tutorial.<\/p>\r\n<p>In order to add icons for social links of your WordPress website, please follow the steps listed below:<\/p>\r\n<h3 class=\"custom\">Adding FontAwesome icons:<\/h3>\r\n<ol>\r\n<li>\r\n<p>First of all, you need to add icons. This can be done with the help of css rules. To add the rules, please log into your WordPress admin panel and navigate to <strong>Appearance<\/strong> -> <strong>Editor<\/strong> tab. Open <strong>style.css<\/strong> file and scroll to the end of the file.<\/p>\r\n<\/li>\r\n<li>\r\n<p>You need to create rules that use selectors for titles of social links and <strong>::before<\/strong> css element. The rules will look the following way:<\/p>\r\n<pre class=\"brush:css\">\r\n[title=\"facebook\"]::before {\r\n  content: \"\uf082\" !important;\r\n  font-family: FontAwesome !important;\r\n  font-size: 40px !important;\r\n}\r\n<\/pre>\r\n<p>In the &#8221; &#8221; of the property <strong>content:<\/strong> you need to insert a FontAwesome icon. To do this, you need to find and copy-paste the icon from <a href=\"http:\/\/fortawesome.github.io\/Font-Awesome\/3.2.1\/cheatsheet\">FontAwesome 3.2.1 Cheatsheet<\/a> inside the &#8221; &#8220;. (Please note that you need to copy the icon itself, not the code for it):<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_2-300x169.jpg\" alt=\"wordpress_how_to_add_an_icons_for_social_links_2\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-51870\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_2-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_2-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_2.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>In this rule you can also define the font size of the icons. For instance, we will set it to 40px with the css property <strong>font-size: 40px !important;<\/strong>.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Now you need to create rules for the rest of the social links that are used in the template. Copy-paste the rule as many times as needed and change the social link title in <strong>[title=&#8221;facebook&#8221;]<\/strong> selector. Then copy-paste icons that you need from  <a href=\"http:\/\/fortawesome.github.io\/Font-Awesome\/3.2.1\/cheatsheet\">FontAwesome 3.2.1 Cheatsheet<\/a> to <strong>content: &#8220;\uf082&#8221; !important;<\/strong>. You will get the rules as follows:<\/p>\r\n<pre class=\"brush:css\">\r\n[title=\"twitter\"]::before {\r\n  content: \"\uf081\" !important;\r\n  font-family: FontAwesome !important;\r\nfont-size: 40px !important;\r\n}\r\n\r\n[title=\"instagram\"]::before {\r\n  content: \"\uf16d\" !important;\r\n  font-family: FontAwesome !important;\r\nfont-size: 0px !important;\r\n}\r\n\r\n[title=\"google\"]::before {\r\n  content: \"\uf0d4\" !important;\r\n  font-family: FontAwesome !important;\r\nfont-size: 40px !important;\r\n}\r\n<\/pre>\r\n<\/li>\r\n<li>\r\n<p>When you are done adding rules, click on <strong>Update File<\/strong> button to save changes:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_3.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_3-300x169.jpg\" alt=\"wordpress_how_to_add_an_icons_for_social_links_3\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-51871\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_3-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_3-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_3.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<\/ol>\r\n<h3 class=\"custom\">Deleting the text of social links<\/h3>\r\n<ol>\r\n<li>\r\n<p>Open the file <strong>static-social-networks.php<\/strong> in <strong>Appearance<\/strong> -> <strong>Editor<\/strong> tab of your WordPress admin panel.<\/p>\r\n<\/li>\r\n<li>\r\n<p>With the help of Ctrl + F search function locate the following line (closer to the end of the file):<\/p>\r\n<pre class=\"brush:php\">\r\necho $social_networks[$i];\r\n<\/pre>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_4.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_4-300x169.jpg\" alt=\"wordpress_how_to_add_an_icons_for_social_links_4\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-51872\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_4-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_4-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_4.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Please delete this line.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Click on <strong>Update File<\/strong> button to save changes.<\/p>\r\n<\/li>\r\n<\/ol>\r\n<p>Refresh your website to see the icons that represent social links on your website:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_5.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_5-300x169.jpg\" alt=\"wordpress_how_to_add_an_icons_for_social_links_5\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-51873\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_5-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_5-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/wordpress_how_to_add_an_icons_for_social_links_5.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>Now you know how to add icons for social links in WordPress (when they are set with text by default).<\/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=0PmsZaTK248?width=1280&amp;height=720\" rel=\"prettyPhoto\">WordPress. How to add icons for social links (when they are set with text)<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to add icons for social links in WordPress (when they are set with text by default).<\/p>\n","protected":false},"author":80,"featured_media":51876,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[728],"tags":[674,521,860,2405],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/51868"}],"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\/80"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=51868"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/51868\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/51876"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=51868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=51868"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=51868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}