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
Thank you, can you please provide the code to dequeue the icon libraries?
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 2 years, 8 months ago by
hashthemes.