How to add Font awesome Icons in WordPress Without Plugins

How to add Font awesome Icons in WordPress Without Plugins

Jun 05, 2023

How to add Font awesome Icons in WordPress

Are you tired of using bulky plugins to add Font Awesome icons to your WordPress site? Look no further! In this post, we'll show you how to add Font Awesome icons to your WordPress site without using any plugins. With our step-by-step guide, you'll be able to add icons to your site in no time. Let's get started!


Read This Before Using Font Awesome In WordPress


It's important to note that while Font Awesome is a great resource for adding icons to your WordPress site, there are a few things to keep in mind before using it.
First, make sure you're using the latest version of Font Awesome to ensure compatibility with your WordPress site. You can download the latest version from the Font Awesome website.


Second, be aware that using too many icons on your site can slow down your site's loading speed. This can negatively impact your site's user experience and SEO. So, use icons sparingly and only where necessary.


Finally, if you're not comfortable editing HTML or CSS code, it's best to use a plugin to add Font Awesome icons to your WordPress site. There are many great plugins available that make it easy to add icons to your site without any coding knowledge.
By keeping these things in mind, you can use Font Awesome to enhance your WordPress site and create a better user experience for your visitors.


To make your WordPress website more attractive we use icons in our design. These icons give an additional look to your website. We can use these icons anywhere on our website. Using icons in your website have many advantages like we need fewer images and also these are vector based and that’s the most important advantage of using icons. Using icons will also improve page speed because instead of heavy images we can use icons which gives a better sense.


What Is Font Awesome


Font Awesome is a popular icon library that provides a wide range of icons that can be used on websites, applications, and other digital projects. It was created by Dave Gandy in 2012 and has since become one of the most widely used icon libraries on the web. Font Awesome icons are vector-based, which means they can be scaled to any size without losing quality. They are also customizable, allowing users to change the color, size, and other properties of the icons to fit their needs. Overall, Font Awesome is a great resource for adding high-quality icons to your digital projects.


When we talk about font icons, we look for font awesome icons. Font awesome is a complete list of icons which are mostly used in websites. Here we will discuss how to import font awesome icons in your theme without the use of any plugin.


Is Font Awesome free?


Yes, Font Awesome is free to use for both personal and commercial projects. They offer a free version of their icon library, which includes over 1,500 icons. They also offer a paid version, which includes additional icons and features. However, the free version is more than enough for most users and provides a great resource for adding icons to your website or application.


The paid version includes additional icons and features, such as icon font ligatures, power-transforms, and access to future updates. The paid version is called Font Awesome Pro and is available as a subscription service. However, the free version of Font Awesome is still a great resource for most users and provides a wide range of high-quality icons for use in personal and commercial projects.


The price for Font Awesome Pro is $99 per year for an individual license, which includes access to all of the Pro icons and features, as well as updates and support. They also offer team and enterprise licenses for larger organizations. However, as I mentioned earlier, the free version of Font Awesome is still a great resource for most users and provides a wide range of high-quality icons for use in personal and commercial projects.


Why You May Need Font Awesome In WordPress


Font Awesome is a great resource for WordPress users who want to add high-quality icons to their website. Font Awesome provides a wide range of icons that can be easily added to your WordPress site using a plugin or by adding the code directly to your theme. These icons can be used to enhance the design of your site, make it more user-friendly, and add visual interest to your content. Additionally, Font Awesome is free to use and offers a paid version with additional icons and features for those who need them. Overall, Font Awesome is a great resource for WordPress users who want to add high-quality icons to their site.


The Official Font Awesome Plugin For WordPress


Font Awesome offers an official plugin for WordPress users. The Font Awesome plugin for WordPress makes it easy to add icons to your site without having to write any code. With the plugin, you can easily search for and add icons to your pages and posts using a simple shortcode. The plugin also includes a variety of customization options, such as icon size, color, and style, so you can easily match the icons to your site's design. Additionally, the plugin is free to use and is regularly updated to ensure compatibility with the latest version of WordPress. Overall, the Font Awesome plugin for WordPress is a great tool for users who want to add high-quality icons to their site without having to write any code.

To Add Icons to WordPress Pages, Posts, and Templates


Adding icons to WordPress pages, posts, and templates is easy with Font Awesome. Here are the steps:



Install the Font Awesome plugin for WordPress.


Once the plugin is installed and activated, you can start adding icons to your pages, posts, and templates.


To add an icon, simply use the shortcode provided by the plugin. For example, to add a Facebook icon, you would use the shortcode [fa icon="facebook"].


You can customize the icon by adding additional parameters to the shortcode. For example, to change the size of the icon, you would use the parameter size="large".


Once you have added the shortcode to your page, post, or template, the icon will appear on your site.


That's it! Adding icons to WordPress pages, posts, and templates is easy with Font Awesome.


Plugins For Using Font Awesome On WordPress Without Using HTML Or Shortcodes


there are several plugins available for WordPress users who want to use Font Awesome icons without having to write HTML or shortcodes. One popular option is the "Better Font Awesome" plugin, which allows you to use Font Awesome icons directly from the WordPress editor. With this plugin, you can simply click on the "Font Awesome" button in the editor and select the icon you want to use. Another option is the "Font Awesome 4 Menus" plugin, which allows you to add Font Awesome icons to your WordPress menus. This plugin provides an easy-to-use interface for selecting and adding icons to your menu items. Overall, there are several plugins available for WordPress users who want to use Font Awesome icons without having to write HTML or shortcodes.


Visual Composer Website Builder: Visual Composer Website Builder includes built-in support for Font Awesome icons. With Visual Composer, you can easily add Font Awesome icons to your pages and posts using the drag-and-drop interface. Simply drag the "Icon" element onto your page, select the icon you want to use, and customize it to match your site's design. Visual Composer also includes a variety of customization options for Font Awesome icons, such as size, color, and style. Overall, Visual Composer Website Builder is a great tool for users who want to add high-quality icons to their site without having to write any code.


Better Font Awesome: Better Font Awesome is a popular plugin for WordPress users who want to use Font Awesome icons without having to write HTML or shortcodes. With Better Font Awesome, you can easily add Font Awesome icons to your pages and posts using the WordPress editor. Simply click on the "Font Awesome" button in the editor and select the icon you want to use. Better Font Awesome also includes a variety of customization options for Font Awesome icons, such as size, color, and style. Overall, Better Font Awesome is a great tool for users who want to add high-quality icons to their site without having to write any code.


WP Font Awesome: WP Font Awesome is a plugin for WordPress that allows you to easily add Font Awesome icons to your site. With WP Font Awesome, you can choose from over 1500 icons and customize them to match your site's design. The plugin also includes a variety of customization options for Font Awesome icons, such as size, color, and style. WP Font Awesome is a great tool for users who want to add high-quality icons to their site without having to write any code.


How To Add Font Awesome On WordPress Without Plugins


To add Font Awesome icons to your WordPress site without using a plugin, you can use the Font Awesome CDN (Content Delivery Network). Here are the steps to follow:



  1. Go to the Font Awesome website (https://fontawesome.com/) and sign up for a free account.
  2. Once you've signed up, you'll be able to access the Font Awesome CDN.
  3. In your WordPress dashboard, go to Appearance > Editor and open the functions.php file.
  4. Add the following code to the file:
function add_font_awesome() {
wp_enqueue_style( 'font-awesome', 'https://use.fontawesome.com/releases/v5.0.6/css/all.css' );
}
add_action( 'wp_enqueue_scripts', 'add_font_awesome' );


  1. Save the file and refresh your site.


    That's it! You should now be able to use Font Awesome icons on your WordPress site without using a plugin.


    Import Font awesome Icons in WordPress


    First, you have to create a child theme of your parent theme. Creating child theme is important because if any update on your parent theme comes to your files will not be affected. To know how to create a child theme in WordPress read our previous article.

    You can import Font Awesome using two methods:

    1. Using functions.php file.

    2. Using header.php file.

1. Using functions.php file

First, you have to create a function.php file in your child theme folder.

Then you have to add a function in functions.php file to import your Font awesome icons. There are two methods of importing font awesome icons in your theme:

  • By using the link to Font Awesome icons CSS file in the functions.php file.
  • By locally download the Font awesome Zip file and then add a call to action function in functions.php file.
Using link of CSS file in functions.php
  • 1. Open functions.php file and paste below code:

  • function wpb_load_fa() {
  • wp_enqueue_style( 'wpb-fa', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css' );
  • }
  • add_action( 'wp_enqueue_scripts', 'wpb_load_fa' );
Downloading Font Awesome zip file & link directory in functions.php
  • 1. Click on the download link on the font awesome icon homepage and download the zip file.
  • [wp_ad_camp_2]
  • 2. When you download the zip file you will see the fonts and CSS file inside the zip file. Copy the fonts and CSS folder which you get in the zip file in the child theme folder.
  • 3. It’s time to add a function in functions.php file to load our stylesheet. Open the functions.php file and paste below code:

  • add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
  • function enqueue_parent_styles() {
  • wp_enqueue_style( 'parent-style', get_template_directory_uri().'css/font-awesome.css.css' );
  • }

Your Font awesome icons are now imported in your theme. You can use CSS classes(like for download icon class is ‘fa-download’) given in the cheat sheet in your HTML like below code:


<i class="fa fa-home" aria-hidden="true"></i>

2. Using header.php file

Download header.php file forms your parent theme.

Copy this file into your child theme folder.

There are also two methods of importing font awesome icons in your theme Using header.php:

  • By using the link to Font Awesome icons CSS file in the header.php file.
  • By locally download the Font awesome Zip file and then add a call to action function in header.php file.
Using link to CSS file in header.php
  • 1. Open header.php file and add following code to the head of the file.

  • <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"/>
  • See below screenshot also:

[wp_ad_camp_1]

Downloading Font Awesome zip file & link directory in header.php

Do the same process to download and place the Font Awesome files in child theme folder as mentioned above.

  • 1. Open header.php file and add following code to the head of the file.

  • <link rel="stylesheet" href="yourdomainname/wordpress/wp-content/themes/twentyseventeen-child/css/font-awesome.css"/>
  • See below screenshot also:

Note: Use your actual domain name instead of using yourdomainname in the URL. Then only your file will load. Also, twentyseventeen-child option in the URL depends on whatever you give the name to your child theme. Place the name of your child theme whatever you were given.


how to use font awesome icons in wordpress


Here's a step-by-step guide on how to use Font Awesome icons in WordPress:




First, go to the Font Awesome website and choose the icon you want to use. You can browse through the icons or use the search bar to find a specific one.




Once you've found the icon you want to use, click on it to open the icon page. From there, you can copy the icon's HTML code or CSS code.




Next, go to your WordPress site and open the page or post where you want to add the icon.




In the WordPress editor, switch to the Text tab to access the HTML code.




Paste the Font Awesome icon's HTML code or CSS code into the HTML editor where you want the icon to appear.




Switch back to the Visual tab to see the icon in your post or page.



That's it! You've successfully added a Font Awesome icon to your WordPress site without using any plugins.


How To Fix Font Awesome Issues


To fix Font Awesome issues on your WordPress site, you can try the following solutions:



  1. Clear your browser cache: Sometimes, Font Awesome icons may not display properly due to a caching issue. Clearing your browser cache can help resolve this issue.
  2. Check your Font Awesome version: Make sure you're using the latest version of Font Awesome. If you're using an older version, it may not be compatible with your site.
  3. Check for conflicts with other plugins or themes: Sometimes, Font Awesome issues can be caused by conflicts with other plugins or themes. Try disabling other plugins or switching to a default theme to see if this resolves the issue.
  4. Check your Font Awesome code: Make sure your Font Awesome code is correct and properly formatted. If there are any errors in your code, this can cause issues with displaying Font Awesome icons.


List Of Font Icon Alternatives For WordPress


Here are some popular Font Icon alternatives that you can use on your WordPress site:


  1. SVG Icons: SVG icons are vector-based graphics that can be easily customized and scaled without losing quality. There are many free and paid SVG icon sets available that you can use on your site.
  2. Dashicons: Dashicons is a built-in icon font in WordPress that includes over 300 icons. You can use these icons in your WordPress theme or plugin.
  3. FontAwesome: FontAwesome is a popular icon font that includes over 1500 icons. It's easy to use and customize, and there are many free and paid icon sets available.
  4. Material Icons: Material Icons is a popular icon font from Google that includes over 900 icons. It's designed to work well with Google's Material Design language.
  5. IcoMoon: IcoMoon is a popular icon font that includes over 5000 icons. It's easy to use and customize, and there are many free and paid icon sets available.
  6. Iconify: Iconify is another popular icon font that you can use on your WordPress site. It includes over 40,000 icons from various icon sets, including FontAwesome, Material Design Icons, and more. Iconify is easy to use and customize, and there are many free and paid icon sets available. You can use Iconify with WordPress by installing the Iconify plugin, which allows you to easily add icons to your site using shortcodes or the WordPress block editor.
  7. Feather: Feather is another popular icon font that you can use on your WordPress site. It includes over 280 icons that are designed to be simple and lightweight. Feather is easy to use and customize, and there are many free and paid icon sets available. You can use Feather with WordPress by installing the Feather Icons plugin, which allows you to easily add icons to your site using shortcodes or the WordPress block editor.
  8. Dripicons: Dripicons is another popular icon font that you can use on your WordPress site. It includes over 200 icons that are designed to be simple and elegant. Dripicons is easy to use and customize, and there are many free and paid icon sets available. You can use Dripicons with WordPress by installing the Dripicons plugin, which allows you to easily add icons to your site using shortcodes or the WordPress block editor.
  9. Material Icons: Material Icons is a popular icon font that you can use on your WordPress site. It includes over 1,000 icons that are designed to be simple and consistent with Google's Material Design guidelines. Material Icons is easy to use and customize, and there are many free and paid icon sets available. You can use Material Icons with WordPress by installing the Material Icons plugin, which allows you to easily add icons to your site using shortcodes or the WordPress block editor.
  10. Bootstrap Icons: Bootstrap Icons is a popular icon font that you can use on your WordPress site. It includes over 1,200 icons that are designed to be simple and consistent with the Bootstrap framework. Bootstrap Icons is easy to use and customize, and there are many free and paid icon sets available. You can use Bootstrap Icons with WordPress by installing the Bootstrap Icons plugin, which allows you to easily add icons to your site using shortcodes or the WordPress block editor.


These are just a few of the many Font Icon alternatives available for WordPress.

You can also check How to add font awesome icons in custom menu in WordPress.