How to add font awesome in wordpress theme

Adding Font Awesome in WordPress Theme is very easy and will take less than 5 minutes. The following codes to add font awesome are tested by using WordPress Child Theme and it works great.

About Font Awesome: It is a font and icon toolkit based on CSS and LESS. Lightweight and widely used font icon toolset has a huge collection of icons for Free and Pro users.

How to use Font Awesome Icons?

Using Font Awesome icons are very easy and straight forward. HTML <i> tag is the best to use for font awesome icons.

To use Font Awesome in a project, first, need to call the Library either from CDN or from a web server. Then add related HTML <i> tag.  A simple example of how to use is:

  • First, add this <script src=""></script> code in HTML <head> tag. Note: Please get a free Font Awesome Kit at and replace the “YOURCODE.JS” with your own kit
  • Second, add this HTML <i class="fa fa-home"></i> code in the project where you would like to display it.

How to use Font Awesome in WordPress Theme?

To use font awesome icons in WordPress theme right way, follow these below steps:

Step 1: Open functions.php file (Assuming you are using a WordPress child theme)

Step 2: Add this below code

// Add Font Awesome in WordPress Theme
add_action ('wp_enqueue_scripts', 'font_awesome_script');
function font_awesome_script(){
    wp_enqueue_script('fontawesome-script', '', array(), NULL, true);
    // Get your own Font Awesome Kit at

Step 3: Save it

Step 4: Add the font awesome icons relative class with HTML <i> tag in WordPress theme template file. Such as

<!-- Add Font Awesome html tag icon url:>
<i class="fas fa-home"></i>

Step 5: Save it and you are done.

Leave a Comment

Item added to cart.
0 items - $0.00