Australia's Leading Digital Marketing Experts. T. 1300 235 433  |  Aggreagtion Enquires Welcome

Using Font Awesome in WordPress

This code snippet supports a number of our articles where Font Awesome is required or recommended. Font Awesome gives you scalable vector icons that can instantly be customized - size, color, drop shadow, and anything that can be done with the power of CSS. At the time of writing there's 675 icons.

Copy and paste the WordPress function into your theme's functions.php file or, if you sensibly have one installed, your custom functions plugin.

1
<?php 
2
/*
3
    Using Font Awesome in WordPress
4
    http://www.beliefmedia.com/code/wp-snippets/font-awesome-wordpress
5
*/
6
 
7
 
8
function beliefmedia_enqueue_font_awesome() {
9
  wp_enqueue_style('load-fa', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css');
10
}
11
add_action('wp_enqueue_scripts', 'beliefmedia_enqueue_font_awesome');

Full usage details may be found on the FA website.

Like this article?

Share on facebook
Share on Facebook
Share on twitter
Share on Twitter
Share on linkedin
Share on Linkdin
Share on pinterest
Share on Pinterest

Leave a comment