I have a theme that makes use of Font Awesome icons by default. I have replaced all of them with custom .png icons using CSS. However, on web page load, the font-awesome icons takes up a size or bandwidth of 55.8 kb which is not good for page speed. How do I prevent an http request for Font Awesome icons altogether? I tried renaming and deleting the Font Awesome folder of the theme but the http request is still being made although it's unclear if its still taking up the same aforementioned bandwidth but I would like to prevent the request anyway. I have the following lines in my functions.php
:
function myTheme_load_style() {
if ( !is_admin() ) {
wp_enqueue_style( 'myTheme_googleFonts', '//fonts.googleapis.com/css?family=Lato:400,700,900,400italic,700italic|Merriweather:700,900,400italic' );
wp_enqueue_style( 'myTheme_fontawesome', get_template_directory_uri() . '/fa/css/font-awesome.css' );
wp_enqueue_style( 'myTheme_style', get_stylesheet_uri() );
}
}
Would modifying the above lines help? If yes, how? If no, how do I, then?
wp_enqueue_style
line.wp_dequeue_style()
. Next time please add relevant information, like the use of a child theme to your question.