This topic has 8 replies, 2 voices, and was last updated 2 years, 2 months ago ago by Rose Tyler
Hi,
I need this becasue of the following reasons:
1- Page speed
2- Most importantly the GDPR (General Data Protection Regulation)
I’ve tried to add the following code in child-theme functions.php that I’ve found in another topic from years ago on your website but it didn’t work:
function custom_remove_styles() {
global $wp_styles;
wp_dequeue_style('font-roboto');
wp_dequeue_style('font-open-sans');
}
add_action( 'wp_enqueue_scripts', 'custom_remove_styles' ,131);
My question is:
1) How can I remove/dequeue fonts.googleapis.com with functions.php?
2) Do I need to make changes in css (or other places) when using custom fonts?
Thanks in advance.
Hello,
XStore Control Panel -> Custom fonts, after you upload fonts you may select them in the list of Typography fonts (Theme Options -> Typography) -> http://prntscr.com/vobjsf , and so on. So that the uploaded font will be loaded locally.
Regards
Hi,
I’ve already tried that but that doesn’t remove or dequeue the fonts.googleapis.com from the header https://prnt.sc/KAqnrePIJsPQ
https://prnt.sc/ygftLlFgetmS
I want to remove it completely.
Regards
Hello,
Provide URL of your site, temporary wp-admin, and FTP access.
Regards
Hi,
See Private content area.
Regards.
Hello,
Our answer contains screenshots from your site, so we posted it via the Private Content area, please check.
Regards
Hi ,
Thanks for your answers!
By adding the following code to child functions.php it disabled google fonts.
add_filter( 'elementor/frontend/print_google_fonts', '__return_false' );
Source: https://elementor.com/help/speed-up-a-slow-site/
Regards
Hello,
Thanks for letting us know.
Have a nice day!
Regards
Tagged: dequeue, directly, fonts.googleapis.com, remove, themes, woocommerce, wordpress
The issue related to '‘Remove/dequeue fonts.googleapis.com from header and instead loading fonts directly from the site’' has been successfully resolved, and the topic is now closed for further responses