Okay
  Public Ticket #2411582
Remove font-awesome
Closed

Comments

  • Gleechme started the conversation

    Hi

    I don't think I use font-awesome in my child theme. To optimize site loading time, i would like the .woff's file to no longer be loaded (95kb useless).

    Can i remove this loading and what is the risk ?

    I looked at the theme options but i saw nothing about font-awesome (active / not active).

    I saw that we could unload specific css with wp_dequeue and wp_deregister in child theme but none of my tests worked. Would you have an example that works please ?

    I tested several variants like this :

    function remove_unwanted_css() {
        wp_dequeue_style( 'font-awesome-css' );
        wp_deregister_style( 'font-awesome-css' );
    }
    add_action( 'wp_enqueue_scripts', 'remove_unwanted_css', 20 );

    Thanks for your answer !

  • [deleted] replied

    Hi Gleechme,

    I understand your point however if you want to remove FontAwesome it will cause some icons to not display for example social network icons.

    If you agree with that, then please let me know whether you want to remove font awesome in front-end or back-end?

    If you want to remove font awesome in front-end then I have generated CSS by removing Font Awesome from bundle:

    Download this modified main.min.css file and replace it in this directory (of the theme): /assets/css