How to Easily Add Icon Fonts in Your WordPress Theme

Discontinuance you to decide to want to have the ability to add icon fonts in your wordpress plot? Presently considered one of our readers requested what’s absolutely the top system to have the ability to add icon fonts of their wordpress theme?

Icon fonts will allow you to add vector (resizable) icons with out slowing down your internet snarl materials. They’re loaded like internet fonts and may per probability properly moreover be styled utilizing CSS.

On this article, we’ll abet you to with out exclaim add icon fonts in your wordpress theme, little by little.

Using icon fonts with any WordPress theme

What are Icon Fonts and Why You Must unruffled Use Them?

Icon fonts admire symbols or pictograms as an totally different of letters and numbers. These pictograms may per probability properly moreover be with out exclaim added to internet snarl materials snarl materials and resized utilizing CSS. When in distinction to picture primarily based mostly icons, font icons are highly effective quicker which helps together with your general wordpress internet snarl materials scAMPer.

Icon fonts preview

Icon fonts may per probability properly moreover be extinct to command usually extinct icons. As an exAMPle, you may properly properly presumably moreover use them together with your shopping cart, salvage buttons, function packing containers, giveaway contest, and even in wordpress navigation menus.

There are a number of free and originate-source icon fonts readily available that has a total lot of beautiful icons.

Really, each wordpress arrange comes with the free dashicons icon font place. These icons are extinct within the wordpress admin menu and different areas inside wordpress admin area.

Another customary icon fonts are:

  • Font Apt
  • Genericons
  • IcoMoon
  • Linearicons
  • Self-discipline cloth Icons by google
  • The Noun Mission

For the sake of this tutorial, we’ll be utilizing Font Apt. It is a long way essentially the most conventional free and originate-source icon font readily available. We use FontAwesome on WPBeginner internet snarl materials as correctly as our wordpress plugins like OptinMonster, WPForms, RafflePress, and so forth.

On this information, we’re going to cover Three methods of including icon fonts in wordpress. You may properly moreover select the reply that works absolute top for you.

Including Icon Fonts in wordpress Utilizing Plugins

Similtaneously you may properly properly presumably correctly be a newbie stage person actual making an attempt to have the ability to add some icons to your posts or pages, then this diagram is suitable for you. You wouldn’t want to change theme recordsdata, and likewise that you simply simply might be in a construct to make the most of icon fonts throughout the set up in your internet snarl materials.

Very first thing or not it’s very important to realize is ready up and activate the Font Apt plugin for wordpress. For extra miniature print, look our little by little information on find out how to arrange a wordpress plugin.

Upon activation, the plugin permits Font Apt improve in your theme. You may properly moreover now edit any wordpress put up or internet snarl and use icon shortcode like this:

[icon name=”rocket”]

You may properly moreover use this shortcode together with different textual content or by itself in a devoted shortcode block.

Adding icon font shortcode in WordPress

As soon as added, you may properly properly presumably moreover preview your put up or internet snarl to look how the icon will choose on a dwell plot. Right here is the diagram through which it appeared on our check out plot.

Icon preview

You may properly moreover moreover add the font icon shortcode inside a paragraph block by itself the set up you may properly properly presumably moreover use the block settings to increase icon measurement.

Increase icon size

As you prolong the textual content measurement, this may per probability properly choose unfamiliar contained in the textual content editor. That’s as a result of the shortcode wouldn’t mechanically alternate into an icon font contained in the block editor.

You may properly should click on the preview button in your put up or internet snarl to look how the true icon measurement would choose.

Icon font enlarged

You may properly moreover moreover use the icon shortcode inside columns and manufacture function packing containers like this:

Using icon fonts in feature boxes

2. Utilizing Icon Fonts with a wordpress Internet web page Builder

Most well-liked wordpress internet snarl builder plugins comprise built-in improve for icon fonts. This allows you to with out exclaim use icon fonts in your landing pages as correctly as different areas in your internet snarl materials.

Beaver Builder

Beaver Builder is essentially the most simple wordpress internet snarl builder plugin within the market. It enables you to with out exclaim manufacture customized internet snarl layouts in wordpress with out writing any code.

Beaver Builder comes with beautiful icons and keen to make the most of modules that you simply simply may properly properly presumably moreover actual scramble and plunge into your put up and pages.

Beaver Builder icon modules

You may properly moreover manufacture icon teams, add a single icon, and switch them into properly-positioned rows and columns. You may properly moreover moreover take dangle of your admire colours, background, spacing, and margin with out writing CSS.

Edit icon fonts in Beaver Builder

You may properly moreover even manufacture solely customized wordpress themes with out writing any code utilizing Beaver Builder’s Themer product.

Elementor Professional

Elementor is one different customary wordpress internet snarl builder plugin. It moreover comes with a number of components that may allow you to use icon fonts, together with an Icon element.

Elementor icon

You may properly moreover actual scramble and plunge an icon anyplace and use it with rows, columns, and tables to manufacture beautiful pages.

Different customary internet snarl builders like Divi and Visible Composer moreover bear stout improve for icon fonts.

3. Including Icon Fonts in wordpress Manually with Code

As we talked about earlier that icon fonts are actual fonts and may per probability properly moreover be added to your plot equal to that you simply simply may add any customized fonts.

Some icon fonts like Font Apt, are readily available from CDN servers throughout the rep and may per probability properly moreover be linked out of your wordpress theme straight.

You may properly moreover moreover add the complete font itemizing to a folder in your wordpress theme after which use these fonts in your stylesheet.

Since we’re utilizing Font Apt for this tutorial, we’ll expose you the system you may properly properly presumably moreover add it utilizing each methods.

Methodology 1:

This handbook diagram is very simple.

First, or not it’s very important to hunt the recommendation of with the Font Apt internet snarl materials and enter your electronic message sort out to safe the embed code.

Get Font Awesome embed code

Now study your inbox for an electronic message from Font Apt together with your embed code. Copy and paste this embed code in your wordpress theme’s header.php file actual prior to the ticket.

Your embed code will probably be a single line that may obtain the Font Apt library straight from their CDN servers. This may per probability properly choose one factor like this:


This mannequin is easiest, nonetheless it will set off conflicts with different plugins.

A loads greater system may per probability properly properly be to correctly load JavaScript in wordpress utilizing the built-in enqueueing mechanism.

As a exchange of linking to the stylesheet out of your theme’s header template, you may properly properly presumably moreover add the next code in your theme’s capabilities.php file or in a plot-explicit plugin.


function wpb_load_fa() {

wp_enqueue_script( 'wpb-fa', 'https://use.fontawesome.com/123456abc.js', array(), '1.0.0', factual );

}

add_action( 'wp_enqueue_scripts', 'wpb_load_fa' );

Methodology 2:

The second diagram simply is not absolutely the top, nonetheless it might will allow you to host the Font Apt icon fonts in your admire internet snarl materials.

First, or not it’s very important to hunt the recommendation of with the Font Apt internet snarl materials to salvage the font bundle to your pc.

Download icon font to your computer

Merely salvage the icon fonts and unzip the bundle.

Now, you may properly should be a part of to your wordpress website hosting utilizing a FTP shopper and lag to your wordpress theme’s itemizing.

Or not it is a long way vital to manufacture a latest folder there and title it fonts. Subsequent, or not it’s very important to add the contents of the icon fonts folder to the fonts itemizing in your website hosting server.

Uploading icon fonts to your WordPress theme

Now you may properly properly presumably correctly be keen to load icon fonts into your wordpress theme. Merely add this code to your theme’s capabilities.php file or in a plot-explicit plugin.


function wpb_load_fa() {

wp_enqueue_style( 'wpb-fa', get_stylesheet_directory_uri() . '/fonts/css/font-gracious.min.css' );

}

add_action( 'wp_enqueue_scripts', 'wpb_load_fa' );

You may properly need efficiently loaded Font Apt into your wordpress theme.

Now comes the phase the set up you may properly be including precise icons into your wordpress theme, posts, or pages.

Manually Displaying Icon Fonts in wordpress

Budge to the Font Apt’s internet snarl materials to look the stout listing of icons readily available. Click on on any icon you to decide to want to make the most of, and likewise it is a long way probably so that you can to look the icon title.

Icon name
Copy the icon title and use it like this in wordpress.

 

You may properly moreover mannequin this icon in your theme’s stylesheet like this:

.fa-arrow-alt-circle-up { 
font-size: 50px; 
shade:#FF6600; 
}

You may properly moreover moreover mix fairly just a few icons collectively and magnificence them immediately. As an exAMPle, let’s command you to decide to want to command an inventory of hyperlinks with icons subsequent to them. You may properly moreover wrap them under a

element with a selected class.

Residence Library Functions Settings

Now you may properly properly presumably moreover mannequin them in your theme’s stylesheet like this:

.icons-group-item i { 
shade: #333; 
font-size: 50px; 
} 
.icons-group-item i:fly { 
shade: #FF6600
} 

We hope this text helped you be taught to with out exclaim add icon fonts in your wordpress theme. You may properly properly moreover are trying to look at out our tutorial on how to have the ability to add picture icons with navigation menus in wordpress.

Similtaneously you cherished this text, then please subscribe to our YouTube Channel for wordpress video tutorials. You may properly moreover moreover procure us on Twitter and Fb.

The put up Absolutely the top approach to With out issues Add Icon Fonts in Your wordpress Theme appeared first on WPBeginner.