Home › Forums › WordPress Themes – Premium › Lavish Pro › Google Fonts & Optimizing CSS
Hello there,
I am working on improving my website’s speed. According to the Google PageSpeed Tool, I need to optimize CSS Delivery of some Google Fonts (among other things):
https://fonts.googleapis.com/css?family=Open+Sans%3A400%2C700%2C600&ver=4.6.1
https://fonts.googleapis.com/css?family=Lato%3A400%2C700%2C900&ver=4.6.1
https://fonts.googleapis.com/css?family=Parisienne|Titillium+Web
The problem is, I cannot find where the first 2 fonts are located in my CSS…?? I located the the Parisienne/Titillium+Web in my child theme’s Header file, but I cannot find where the other two are. They are not in the child theme’s Header. I do not use those fonts so I would like to remove them from my css completely. I just can’t find them! Is this something you may be able to assist me with? I’ve been wracking my brain. THANK YOU!
My website is: premiereroux.com
-Diana
Dear Diana Cobb,
Those font are rendered using wp_enqueue_scripts hook, you can this on functions.php file under lavish_scripts () function.
If you want to remove them you you can dequeue[ https://codex.wordpress.org/Function_Reference/wp_dequeue_style ] this handler on child theme functions.php
You can follow this example:
function lavish_child_dequeue_scripts() {
wp_dequeue_style( 'lavish-open-sans');
wp_dequeue_script( 'lavish-lato' );
}
add_action( 'wp_enqueue_scripts', 'lavish_child_dequeue_scripts', 100 );
Note: Please follow this procedure only if you are technically sound on WordPress, otherwise you will get some fatal error.
Thanks
I see. In that case, as I am not ‘technically sound’ on WordPress, I will leave it alone. Do you have any recommendations on how to optimize Google fonts?
Thanks!! -Diana
Dear Diana Cobb,
Thank you for your response.Might be this plugin may help you on this: https://wordpress.org/plugins/google-webfont-optimizer/
Thanks
With our premium themes, we offer access to site documentation, video tutorials and timely support. Even if you have just started on WordPress, our support staff have the patience to help you create appealing sites gracefully.
Company
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.To find out more, including how to control cookies, see here: Privacy Policy
© Copyright © 2023 Styled Themes. All Right Reserved.