In this tutorial, we will be discussing how to disable Google fonts in Elementor, a popular page builder for WordPress. By default, Elementor loads Google fonts on the frontend of your website. However, some users may prefer to use custom fonts or simply not use Google fonts at all. This can be accomplished by adding a simple code snippet to your website’s functions.php file.
First, let’s go over why you might want to disable Google fonts in Elementor. Some users may prefer to use custom fonts that are not available through Google fonts. Others may simply not want to use Google fonts at all. Regardless of the reason, disabling Google fonts can be done with a simple code snippet.
The code snippet that is used to disable Google fonts in Elementor is the following:
This code snippet uses the ‘add_filter’ function to add a filter to the ‘elementor/frontend/print_google_fonts’ hook. The ‘__return_false’ function is then used to return a false value, which disables the loading of Google fonts.
To add this code snippet to your website, you will need to access your website’s functions.php file. Once you have access to the functions.php file, you can add the code snippet to the end of the file. After you have added the code snippet, save the changes to the functions.php file. You should now see that Google fonts are no longer loaded on your website when using Elementor.
Summary: By following these simple steps, you can easily disable Google fonts in Elementor. This can be useful for those who prefer to use custom fonts or simply do not want to use Google fonts. Remember to make a backup of your website’s functions.php file before making any changes and test on a staging environment before implementing on a live site.