• Hi,
    Your plugin loads a lot of unnecessary icon library when I load the page. More than 1,5MB of icon fonts loaded unnecessarily, however the frontend uses only 2-3 visible icons. Please let me know how can I disable these large font files to load every time.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author HashThemes

    (@hashthemes)

    Hi,

    Yes, you are correct. We have tried to give the user a wide selection of the icons so that they have lots of choices. And for it, we had to load lot of fonts.

    However, if you use 1-2 or many fonts, its obvious that it need to load a full font package.

    To your solution, we can create an option of not loading the font provided that you don’t use font icon and use image icon instead. Also, there is PHP code to dequeue the font to prevent it from loading. But you need to add it on your child theme so if you are using child theme we can provide you with the code.

    But again, the user base for this option would be very low and plugins are developed in a way to cover larger users.

    Thanks

    Thread Starter adampmc

    (@adampmc)

    Thank you, can you please provide the code to dequeue the icon libraries?

    Plugin Author HashThemes

    (@hashthemes)

    Hi,

    Here is the code

    add_action( 'wp_enqueue_scripts', 'mini_child_deregister_styles', 20); 
    
    function mini_child_deregister_styles() {
    
    wp_dequeue_style('fontawesome-6.3.0');
    wp_dequeue_style('eleganticons');
    wp_dequeue_style('essentialicon');
    wp_dequeue_style('icofont');
    wp_dequeue_style('materialdesignicons');
    
    }

    • This reply was modified 1 year, 5 months ago by HashThemes.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘disable icon library loading’ is closed to new replies.