Site logo

Archived topic

Some Font Awesome icons are not showing?

24 replies · Started by Adam on October 21, 2018

Viewing posts 1–15 of 25

Hello,

I am trying to use some of the latest font awesome icons, in particular this bone icon and this cookie icon.

I have the code snippet to load the latest font awesome library and all my other icons are showing up:

add_action( 'wp_enqueue_scripts', 'tu_load_font_awesome' );
/**
 * Enqueue Font Awesome.
 */
function tu_load_font_awesome() {
    wp_enqueue_style( 'font-awesome', '//use.fontawesome.com/releases/v5.3.1/css/all.css', array(), '5.3.1' );
}

Am I missing something here, why don't these two icons show up?

Thank you,

Hi there,

do you have a link to the Site? And are other FA 5.0 icons rendering?

Hi David,

I tried a bunch of other icons that I believe are from FA 5.0 and they all worked.

My website is in a staging area and requires a log in to view. Where would I privately send the password?

Thank you,

Hi there,

i got the login thank you. But i am seeing a huge amount of shortcodes displayed on the site. Have you de-activated a plugin that is required? Sorry difficult to diagnose the FA issue with the way it looks at the moment. Let me know

Hey David,

Sorry about all the shortcode mess, that was all left over code after I uninstalled the Avada theme and installed generatepress. I have removed it all now but the bone fontawesome still does not appear on the main menu, beside the word chow.

In the menu section I believe I added it properly like the other icons that are displaying properly: <i class="fa fa-bone menu-icon"></i>Chow

Let me know if you think of any possible reasons, thanks a lot for your help.

You're site is running FA 4.7 which doesnt have the bone or the cookie icon.
Have you added any FA plugins as well as the code ?

Hey David,

Oh my bad the only thing I added was the code, `add_action( 'wp_enqueue_scripts', 'tu_load_font_awesome' );
/**
* Enqueue Font Awesome.
*/
function tu_load_font_awesome() {
wp_enqueue_style( 'font-awesome', '//use.fontawesome.com/releases/v5.3.1/css/all.css', array(), '5.3.1' );`

I thought that was fetching the latest FA icons for me. Do I need to use a FA plugin as well as that code?

No - that script should be all you need.
I also checked to make sure BeaverBuilder wasn't loading FA 4 - its not.

Where did you add that script?

I added it to the snippets plug in, the snippet is called "Load Font Awesome Icons". Was that the correct place?

Ok, replace it with this snippet:

add_action( 'wp_enqueue_scripts', 'tu_load_font_awesome' );
/**
 * Enqueue Font Awesome.
 */
function tu_load_font_awesome() {
    wp_enqueue_style( 'font-awesome', '//use.fontawesome.com/releases/v5.3.1/css/all.css', array(), '5.3.1' );
}

I did, but it is still not working.

I'm still seeing Font Awesome 4 loading. It could be a plugin you're using which is adding it.

Try adjusting Davids code to this:

add_action( 'wp_enqueue_scripts', 'tu_load_font_awesome' );
/**
 * Enqueue Font Awesome.
 */
function tu_load_font_awesome() {
    wp_enqueue_style( 'font-awesome-5', '//use.fontawesome.com/releases/v5.3.1/css/all.css', array(), '5.3.1' );
}

Not ideal, as it will load both versions of Font Awesome, but it will tell us if that's the problem or not.

If it is, the next step will be to figure out which plugin is adding Font Awesome 4. You can do this by deactivating your plugins one by one with the original code David gave you until the icon works.

Hi Tom,

So it looks like it fixed when I deactivated the beaver builder page builder plug in. So that is unfortunate, as I am wanting to use that plug in.

Any ideas or do you think I should ask beaver builder for support? It's kind of a weird situation because the icons are not showing up on the generate press menu.

Thank you,

I believe Beaver Builder has an option to use Font Awesome 5 instead of 4? It should be in their settings somewhere.

This archived topic is closed to new replies.