{"id":39946,"date":"2014-12-15T07:46:48","date_gmt":"2014-12-15T12:46:48","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=39946"},"modified":"2017-08-17T06:08:31","modified_gmt":"2017-08-17T10:08:31","slug":"wordpress-how-to-add-a-custom-font","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/wordpress-how-to-add-a-custom-font.html","title":{"rendered":"WordPress. How to add a custom font"},"content":{"rendered":"<p>\r\n<\/p>\r\n<p>This tutorial shows how to add a custom font in WordPress.<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=V613yzbkb0Q?width=1280&amp;height=720\" rel=\"prettyPhoto\">WordPress. How to add a custom font<\/a><\/p>\r\n<div class=\"inline-banner\">\r\n<a href=\"https:\/\/www.templatemonster.com\/service-center\/\">\r\n<img src=\"\/help\/files\/banners\/inline\/Banner-3-(835-x100).jpg\" \/>\r\n<\/a>\r\n<\/div>\r\n<p>In case you  need to add a <em>custom font<\/em> to your <strong>WordPress<\/strong> website, you can search for the website to download the font you need. For example, this website: <a target=\"_blank\" href=\"http:\/\/www.fontsquirrel.com\">http:\/\/www.fontsquirrel.com.<\/a><\/p>\r\n<ol>\r\n<li>\r\n<p>Visit <a target=\"_blank\" href=\"http:\/\/www.fontsquirrel.com\">http:\/\/www.fontsquirrel.com.<\/a> site, there is a &#8216;<strong>Font Filter<\/strong>&#8216;, choose &#8216;<strong>Webfont<\/strong>&#8216; there:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-1.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-1-300x177.png\" alt=\"Wordpress_How_to__add_a_custom_font-1\" width=\"300\" height=\"177\" class=\"aligncenter size-medium wp-image-39948\" \/><\/a><\/p>\r\n<\/li>\r\n<li>\r\n<p>Choose the font you want to add, and download it:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-2.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-2-300x151.png\" alt=\"Wordpress_How_to__add_a_custom_font-2\" width=\"300\" height=\"151\" class=\"aligncenter size-medium wp-image-39949\" \/><\/a><\/p>\r\n<\/li>\r\n<li>\r\n<p>Log into your server through <strong>FTP<\/strong> or <strong>File manager<\/strong>, follow this path &#8216;<em>wp-content\/themes\/themeXXXX<\/em>&#8216; and create a new folder &#8216;fonts&#8217;. Upload the font you have downloaded to this folder, then extract this file(s). You can remove the original .zip file:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-3.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-3-300x35.png\" alt=\"Wordpress_How_to__add_a_custom_font-3\" width=\"300\" height=\"35\" class=\"aligncenter size-medium wp-image-39950\" \/><\/a>\r\n <\/li>\r\n<li>\r\n<p>Log into <strong>WordPress Admin Panel<\/strong>. Go to <strong>Appearance -> Editor<\/strong>, open &#8216;<strong>style.css<\/strong>&#8216; file under themeXXXX theme:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-4.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-4-300x155.png\" alt=\"Wordpress_How_to__add_a_custom_font-4\" width=\"300\" height=\"155\" class=\"aligncenter size-medium wp-image-39951\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Add the below codes to this &#8216;<strong>style.css<\/strong>&#8216; file:<\/p>\r\n<pre class=\"brush:css\">  @font-face { \r\n  font-family: fontname; \r\n  src: url('link'); \r\n}<\/pre>\r\n<p>*with: <em> fontname<\/em> = the name you will create for the new custom font (any name).<\/p>\r\n<p> <em>link<\/em> = the direct link of this font file that you uploaded to the server. (<em>site url + folder path + font file name<\/em>):<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-5.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-5-300x191.png\" alt=\"Wordpress_How_to__add_a_custom_font-5\" width=\"300\" height=\"191\" class=\"aligncenter size-medium wp-image-39952\" \/><\/a>\r\n <\/li>\r\n<li>\r\n<p>Copy the above code to the next line of &#8216;<strong>style.css<\/strong>&#8216; file and remove the second line with &#8216;<strong>src<\/strong>&#8216; from the code, then add <strong>!important<\/strong> tag after the font name: <\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-6.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-6-300x191.png\" alt=\"Wordpress_How_to__add_a_custom_font-6\" width=\"300\" height=\"191\" class=\"aligncenter size-medium wp-image-39953\" \/><\/a><\/p>\r\n<li>\r\n<p>You can find the CSS class for the specific text by using the <a target=\"_blank\" href=\"\/help\/developer-tools.html\">developer tool<\/a>:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-7.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-7-300x149.png\" alt=\"Wordpress_How_to__add_a_custom_font-7\" width=\"300\" height=\"149\" class=\"aligncenter size-medium wp-image-39954\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Replace <strong> @font-face <\/strong> with the CSS class (CSS selector) that you have found with developer tool. Then click &#8216;<strong>Upload File<\/strong>&#8216;:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-8.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/11\/Wordpress_How_to__add_a_custom_font-8-300x191.png\" alt=\"Wordpress_How_to__add_a_custom_font-8\" width=\"300\" height=\"191\" class=\"aligncenter size-medium wp-image-39955\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Refresh your site to see the new custom font showing up.<\/p>\r\n<\/li>\r\n<\/ol>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=V613yzbkb0Q?width=1280&amp;height=720\" rel=\"prettyPhoto\">WordPress. How to add a custom font<\/a><\/p>\r\n<\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to add a custom font in WordPress.<\/p>\n","protected":false},"author":69,"featured_media":41349,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[728],"tags":[789,688,2405],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/39946"}],"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\/69"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=39946"}],"version-history":[{"count":1,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/39946\/revisions"}],"predecessor-version":[{"id":82831,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/39946\/revisions\/82831"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/41349"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=39946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=39946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=39946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}