Black Friday Sale! Get up to $30 off GP Premium! Learn more ➝

[Resolved] how to delete font awesome icons unused?

Home Forums Support [Resolved] how to delete font awesome icons unused?

Home Forums Support how to delete font awesome icons unused?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #236214
    Diego Fernando

    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.

    #236228
    Tom
    Lead Developer
    Lead Developer

    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 πŸ™‚

    #236397
    Diego Fernando

    Thanks Tom. I’ll do it.

    #236468
    Tom
    Lead Developer
    Lead Developer
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.