Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to add font awesome 4.2
- This topic has 5 replies, 3 voices, and was last updated 8 years, 8 months ago by Tony @ AlphaBlossom.
-
AuthorPosts
-
January 11, 2015 at 11:30 am #137068annabelMember
Hi,
Does anyone know how to add font awesome to Genesis? (I don't think the specific child theme matters, but I have Lifestyle Pro).
Font awesome suggests putting <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> into the <head> section of the site html, but I can't find where that is. Does anyone know where that is?
Otherwise, I also tried a method I found here, changing
'//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css'
to
'//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css'
but I don't think it worked. I tried to test it by adding
blockquote, blockquote::before { content: "\f10d"; }
to my custom css to get the fa-quote-left icon when I do a blockquote, but it didn't work.
Thanks,
AnnabelJanuary 11, 2015 at 2:37 pm #137101Tony @ AlphaBlossomMemberHello, the best way is to use the wordpress wp_enqueue_scripts function. Add this code to your theme's functions.php file:
add_action( 'wp_enqueue_scripts', 'youruniqueprefix_load_custom_scripts'); function youruniqueprefix_load_custom_scripts() { // Include Fontawesome stylesheet wp_enqueue_style( 'abte-fontawesome' , '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css' ); }
There's a good chance you already have a function like this in your theme's functions.php file, so if you do then you can just include the wp_enqueue_style line within the existing function.
Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom
August 27, 2015 at 11:38 am #163761turkmanduParticipantI could use some help ...
There is no code in my child theme's functions.php file calling for Font Awesome AND YET I can see this is in my <head>
<link rel='stylesheet' id='font-awesome-css' href='//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.css' type='text/css' media='screen' />
How do find where this is being inserted into the <head> so I can either delete it OR edit it?
Thanks in advance,
MattAugust 27, 2015 at 11:49 am #163764Tony @ AlphaBlossomMemberIt can be added many ways, like through a plugin or another file. Without more info it's hard to say.
A couple of recommendations:
- check your admin Genesis settings. In your WordPress admin, go to "Genesis > Theme Settings" and look in the "Header and Footer Scripts field to see if the code has been added there
- If it's not there, you can try deactivating your plugins one at a time to see if any of them are adding it
- You can search your website files for "font-awesome-css" (the ID) to find which file is adding this.
Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom
August 27, 2015 at 12:26 pm #163769turkmanduParticipantHey Tony ...
You know how you think you've checked everything but then someone says do it again?
Well BINGO! It was the "Scroll Back to Top" plugin!!!
I thought I had checked every plugin but must have either missed that one or didn't refresh after checking it.
Thanks WP Brother!
August 27, 2015 at 12:45 pm #163771Tony @ AlphaBlossomMemberhehe, I know it all too well, Matt!
Glad you got it sorted out 🙂 Have a great one...
Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.