Categories

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

WordPress. How to add a custom font

Elina Webb December 15, 2014
Rating: 5.0/5. From 1 vote.
Please wait...

This tutorial shows how to add a custom font in WordPress.

WordPress. How to add a custom font

In case you need to add a custom font to your WordPress website, you can search for the website to download the font you need. For example, this website: http://www.fontsquirrel.com.

  1. Visit http://www.fontsquirrel.com. site, there is a ‘Font Filter‘, choose ‘Webfont‘ there:

    Wordpress_How_to__add_a_custom_font-1

  2. Choose the font you want to add, and download it:

    Wordpress_How_to__add_a_custom_font-2

  3. Log into your server through FTP or File manager, follow this path ‘wp-content/themes/themeXXXX‘ and create a new folder ‘fonts’. Upload the font you have downloaded to this folder, then extract this file(s). You can remove the original .zip file:

    Wordpress_How_to__add_a_custom_font-3

  4. Log into WordPress Admin Panel. Go to Appearance -> Editor, open ‘style.css‘ file under themeXXXX theme:

    Wordpress_How_to__add_a_custom_font-4

  5. Add the below codes to this ‘style.css‘ file:

      @font-face { 
      font-family: fontname; 
      src: url('link'); 
    }

    *with: fontname = the name you will create for the new custom font (any name).

    link = the direct link of this font file that you uploaded to the server. (site url + folder path + font file name):

    Wordpress_How_to__add_a_custom_font-5

  6. Copy the above code to the next line of ‘style.css‘ file and remove the second line with ‘src‘ from the code, then add !important tag after the font name:

    Wordpress_How_to__add_a_custom_font-6

  7. You can find the CSS class for the specific text by using the developer tool:

    Wordpress_How_to__add_a_custom_font-7

  8. Replace @font-face with the CSS class (CSS selector) that you have found with developer tool. Then click ‘Upload File‘:

    Wordpress_How_to__add_a_custom_font-8

  9. Refresh your site to see the new custom font showing up.

Feel free to check the detailed video tutorial below:

WordPress. How to add a custom font

Best Professional Wordpress Themes
This entry was posted in WordPress Tutorials and tagged custom, font, 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