• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Install Font Awesome Icons In Genesis

Before you install font awesome, consider using dashicons which are already included in WordPress so you only need to load them.

Otherwise, add the following PHP code to your child themes functions file to load font awesome icons.

add_action( 'wp_enqueue_scripts', 'add_font_awesome_icons' );
function add_font_awesome_icons() {
    wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
}

The fonts are hosted here

You can also load the icons from cloudfare.com:

add_action( 'wp_enqueue_scripts', 'add_font_awesome_cloudfare' );
function add_font_awesome_cloudfare() {
    wp_enqueue_style( 'font-awesome', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css' );
}

You can also download the font icons and upload the folder to your child themes root directory, them load them using PHP code in your functions file like this:

add_action( 'wp_enqueue_scripts', 'add_font_awesome_child_theme' );
function add_font_awesome_child_theme() {
    wp_enqueue_style( 'font-awesome', get_bloginfo( 'stylesheet_directory' ) . '/font-awesome/css/font-awesome.min.css' );
}

Make sure the path to the font-awesome.min.css file is correct.

Then use them in your theme like this

Related Tutorials

  • Load Ion Icons In Genesis
  • Adding Dashicons in WordPress

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems