Font-Awesome and WordPress

I’m starting to wrap my head around WordPress – and believe me, with a head this thick that takes awhile! At any point, I love using Font-Awesome (btw – they don’t have a specific icon for their font-awesome product, I think they use fa-flag . They do have one for fort-awesome an interesting way to partially monetize font-awesome – check it out!). There are a bunch of plug-ins out there, but many of them use older versions of font-awesome, or place some restrictions on where you can use it. A quick and dirty way that you can use it in many themes is by altering your theme’s ‘function.php’ file.

You can either set up a new action within your function.php file:

function prefix_enqueue_awesome() {
wp_enqueue_style( 'prefix-font-awesome', '//', array(), '4.5.0' );
add_action( 'wp_enqueue_scripts', 'prefix_enqueue_awesome' );

Alternatively, just insert:
wp_enqueue_style( ‘prefix-font-awesome’, ‘//’, array(), ‘4.5.0’ );

into the existing enqueue_scripts function. Either way, updates to the theme will likely overwrite this change, so it is something you will have to keep in mind!

As I said, I’m new to WordPress and I would love some feedback on this method. Do you use Font-Awesome on your site, and if so, how?

I would also love to get some feedback on Fort-Awesome. I think I’m going to head over there and check out their free plan!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.