Site logo

Archived topic

how to delete font awesome icons unused?

3 replies · Started by Diego Fernando on October 17, 2016

Viewing posts 1–4 of 4

Hello. I've seen your post about how to optimize load time on my web site. I use just 5 icons of font awesome, and I'd like delete icons that I don't use with exception of these 5 icons. How can I do it?

Thanks for your help!! :)

Edit: I put the code font awesome essentials in my own php plugin:

add_filter( 'generate_fontawesome_essentials', 'generate_fontawesome_essentials' );
function generate_fontawesome_essentials()
{
return true;
}

After this, I deleted it to see icons again, but i can't see them.

Hi there,

Not overly easy, but do-able.

Looks like you've completed step one, use the generate_fontawesome_essentials filter to only load the icons GP needs.

Next, you would have to use a tool like Fontello or IcoMoon to build your font file only with the 5 icons you need.

Those tools will give you font files.

You'll then need to upload those font files into your child theme.

Now that you have that done, you'll need to use @font-face to incorporate them into the theme: https://css-tricks.com/snippets/css/using-font-face/

Whichever tool you use will also give you a style.css file - you'll want to copy that CSS and add it to your child theme as well.

Hopefully this is enough to get you started :)

Thanks Tom. I'll do it.

No problem :)

This archived topic is closed to new replies.