This post is focused on the solution to Remove Google Fonts from WordPress Theme. Nowadays, most of the WordPress themes comes pre-installed with Google Fonts or Google Web Fonts. You can remove google fonts from a website with or without using WordPress plugin.

Why Remove Google Fonts from WordPress Theme
Google Fonts looks great and give your website a unique and modern look. And at the same time, you also compromised with website performance.
I have removed Google Fonts from my website and using Web Safe Fonts without compromising the look and feel of my website. Which resulted in increased website loading speed and good performance.
How to Remove Google Fonts from WordPress Theme
Now, let’s discuss how you can Remove Google Fonts from WordPress theme. You can remove google fonts from the website by adding a piece of code into your theme files.
Theme developers add Google Fonts CSS stylesheet using WordPress Function wp_enqueue_style()
in the functions.php
file of your WP theme. This WP Function is intended to register any CSS stylesheet via provided source and enqueues the same.
Remove Google Fonts from WordPress Theme – Without Plugin
It is quite simple, you only need to add a specific WordPress Function wp_dequeue_style()
into functions.php
file of your WordPress theme. This WP Function is used to remove a previously enqueued CSS stylesheet. I have tried to unfold the uses in following steps.
Before that we need to understand how this WP Function wp_dequeue_style()
works and its requirements.
- WordPress Function –
wp_dequeue_style( string $handle )
- Description – Remove a previously enqueued CSS stylesheet.
- Parameters –
$handle
│ It is mandatory. A unique name of the enqueued CSS stylesheet.
Following code need to be added in the functions.php
file.
Remove Google Fonts from Genesis Sample WordPress Theme.
//* TN Dequeue Styles - Remove Google Fonts from Genesis Sample WordPress Theme add_action( 'wp_print_styles', 'tn_dequeue_google_fonts_style' ); function tn_dequeue_google_fonts_style() { wp_dequeue_style( 'genesis-sample-fonts' ); }
The $handle
or the unique name of enqueued CSS stylesheet for Google fonts in Genesis Sample WordPress Theme is genesis-sample-fonts.
This code will work with every WordPress them in which Google Fonts enqueued via WordPress function. You only need to identify and replace this unique name/$handle with your stylesheet $handle
. And add this code in the functions.php
file of your WordPress theme. Try to search your functions.php file with Keyword ‘fonts’
or ‘google’
.
Don’t forget to take a backup of your functions.php file, will be useful in case of any miss happening.
Remove Google Fonts from Divi theme by Elegant Themes
//* TN Dequeue Styles - Remove Google Fonts from Divi Theme add_action( 'wp_print_styles', 'tn_dequeue_divi_fonts_style' ); function tn_dequeue_divi_fonts_style() { wp_dequeue_style( ‘divi-fonts' ); }
Cheat Sheet to identify Google Font Stylesheet name or $handle of popular WordPress Themes
Theme | Google Fonts Stylesheet Name / $handle |
Twenty Twelve | twentytwelve-fonts |
Twenty Thirteen | twentythirteen-fonts |
Twenty Fourteen | twentyfourteen-fonts |
Twenty Fifteen | twentyfifteen-fonts |
Twenty Sixteen | twentysixteen-fonts |
Twenty Seventeen | twentyseventeen-fonts |
Genesis Sample | genesis-sample-fonts |
Extra | extra-fonts |
Divi | divi-fonts |
Remove Google Fonts from WordPress Theme – With Plugin
There are several plugins available on WordPress repository to remove Google Fonts specifically. You only need to install and activate following WordPress plugins.
- Disable Google Fonts – It is a very basic WordPress, which is light in weight. There is no setting. You just need to activate it and it works immediately. This plugin works well with bundled WordPress themes e. Twenty Twelve, Twenty Thirteen, Twenty Fourteen, Twenty Fifteen, Twenty Sixteen, Twenty Seventeen.
- Remove Google Fonts References – This is also a good plugin. It stops loading Google Fonts in WordPress theme. No settings are there, it started working automatically after installation and activation.
Wrapping Up
I do not recommend shared web hosting users to use Google Fonts on their website. As it impacts your website speed badly.
What fonts do you use, Google Fonts or Web Safe Fonts? Does using Google Fonts impact your website performance?
Let us know if you want to Remove Google Fonts from any other WordPress theme.
You might like:
How to Remove Dashicons from Genesis Theme
Remove Font Awesome from WordPress Theme
Thank you so much – easy & perfect solution!
Best regards
Heike
Hi, at my Divi Child Theme this did not work.
Hi Joerg,
Thank you for pointing out. You should use the correct stylesheet $handle to remove google fonts from Divi theme. In the latest version of Divi theme, they changed the stylesheet $handle.
Try using
divi-fonts-css
instead ofdivi-fonts
. It will work.Is is possible to remove Google fonts from Elemin theme of Themify family. Please let me know.
Thanks
Yes. Just try to use the right $handle.
I have build a divi child theme and add to functions.php the script:
//* TN Dequeue Styles – Remove Google Fonts from Divi Theme
add_action( ‘wp_print_styles’, ‘tn_dequeue_divi_fonts_style’ );
add_action( ‘wp_enqueue_scripts’, ‘tn_dequeue_divi_fonts_style’ );
function tn_dequeue_divi_fonts_style() {
wp_dequeue_style( ‘divi-fonts-css’ );
wp_dequeue_style( ‘divi-fonts’ );
}
but it will not working with divi-fonts-css or divi-fonts. My Divi version is 3.0.5
In that case, you have to use the web safe font from the customize panel and then use this code to remove google font.
Hi! I am using the Accesspress parallax pro Themen and IT doesn’t work. :(( Do you have an Idea?
You should have use this (google-fonts-css) $handle to make it work.
any idea what font handle does bridge theme uses?
use the plugin, if you are not able to identify the $handle
Good evening, I write from Spain the article is very interesting, and I was wondering if you can help me … my topic is Salient, what function do I have to place in the file functions.php
Greetings and I’m waiting.
if ( ! function_exists( ‘hoffman_load_style’ ) ) {
function hoffman_load_style() {
if ( ! is_admin() ) {
wp_register_style( ‘hoffman_googleFonts’, ‘//fonts.googleapis.com/css?family=Raleway:400,600,700,800|Vollkorn:400,400italic,700,700italic’ );
wp_register_style( ‘hoffman_genericons’, get_template_directory_uri() . ‘/genericons/genericons.css’ );
wp_enqueue_style( ‘hoffman_style’, get_stylesheet_uri(), array( ‘hoffman_googleFonts’, ‘hoffman_genericons’ ) );
}
}
add_action( ‘wp_print_styles’, ‘hoffman_load_style’ );
what do i do to stop calling google fonts without losing all other formatting?
You can comment out the Goggle fonts line from your code.
/* wp_register_style( ‘hoffman_googleFonts’, ‘//fonts.googleapis.com/css?family=Raleway:400,600,700,800|Vollkorn:400,400italic,700,700italic’ ); */
This should work.
Hey there great post, do you happen to know what the $handle is for the AVADA theme? I’m thinking it may be Avada_Fonts or Avada_gfonts??
Thanks for your help.
Hi, The default font of AVADA theme is museo-slab and PT-sans. museo-slab is not a Google font so, these fonts should have to removed/changed from the style.css/function.php file. If you are not comfortable in editing theme files Try using the plugin to remove google font.
Cheers!
Interesante. Gracias.
Hey,
It doesn’t work for me. I have Wealth theme.
I added this :
add_action( ‘wp_print_styles’, ‘tn_dequeue_google_fonts_style’ );
function tn_dequeue_google_fonts_style() {
wp_dequeue_style( ‘wealth-fonts’ );
}
and when I open my site, it seems like it works for some milliseconds and then some scripts allow the google fonts again :O
Hey Seb,
Thank you for the response. After removing the font, test your site in an incognito window, it should work.
Otherwise, you must remove the code from the theme file, or use the plugin.
thank you so much. finally a solution that worked, after trying for hours! thanks!!
Does not work on AccessPress Lite.
Hey Danil, I am not sure which
$handle
you are using to remove the google font. However, to make it work with AccessPress Lite, you should useaccesspresslite-google-fonts
My website using Xmag Them, but I don’t find the theme Google fonts. Please help me! Thanks
In that case, you should use a plugin to remove google font.
hi!
My website used xmag theme. And I have removed Google fonts by code:
/* TN Dequeue Styles – Remove Google Fonts from Xmag Theme
add_action( ‘wp_print_styles’, ‘tn_dequeue_xmag_fonts_style’ );
function tn_dequeue_xmag_fonts_style() {
wp_dequeue_style( ‘xmag-fonts’ );
}
When I use PageSpeed Insights check, the google fonts still load.
Please help me!
It should work if you are using the
$handel
right? Otherwise, you should use a plugin.Thanks for your post, Saurabh. You are right: G. fonts can impact the performance of our websites pretty badly, and not only on shared hosting…
I have a (probably stupid 🙂 ) question, though: why not delete or comment out the wp_enqueue_style() in functions.php and replace the font(s) in the stylesheet? I don’t understand this enqueue then dequeue process.
That’s what I’ve done with Genesis Sample and it’s working just fine, unless I’m missing something…
Hey, there is no harm in deleting and commenting out the wp_enqueue_style() from your theme. It will work fine.
The dequeuing function works, when you did not (wanted to) know/or unable to found font enqueue function in your theme. ?
😀 😀 😀
Anyone who cannot find and comment out this piece of code is unable to understand your post. (which doesn’t mean (s)he is stupid, don’t get me wrong)
google analytics and google fonts fu**ked my site speed
very thanks for this help
Hi, I have an doubt that, removing of google fonts will not affect our front-end pages right?
Hi Lavanya,
Removing the google font may affect the front end of your website. It totally depends on the avilability of the fallback fonts.
Really an amazing article. However, I’m using oceanWP theme. There is a option in customize>typography>general to disable the Google font. I disabled it and it looks ugly now. Is there any way to remove Google font without compromising the look in oceanWP theme?