Deactivate Google Fonts with an additional plugin

Access ready-to-use Telemarketing Data to expand outreach, generate quality leads, and maximize your marketing ROI.
Post Reply
mdsojolh444
Posts: 69
Joined: Tue Jan 07, 2025 5:30 am

Deactivate Google Fonts with an additional plugin

Post by mdsojolh444 »

Check the settings of the installed plugins. Look for options related to fonts or typography. Disable Google Fonts or choose another local font.

There are special plugins like the Disable and Remove Google Fonts Plugin that can help you disable Google Fonts and use local fonts instead. These plugins detect the corresponding source code that establishes a connection to the Google Fonts services and block these scripts and thus automatically all Google Fonts on your website:

Install the plugin Disable and Remove Google Fonts .
Activate the plugin after installation.
Disable Google Fonts manually in the theme via the functions.php file
The functions.php file is a file in your WordPress theme that contains custom functions and code snippets to extend the functionality of your website.

However, making changes to this file can be risky, especially if you don't know exactly what you're doing. Incorrect changes can cause your website to stop working properly or even crash completely.

For this reason, we recommend that you only make adjustments if you have the necessary knowledge:

Step 1: Create a backup

Before making any changes to functions.php, make a full backup of your bc data mexico website so that you can restore it to its original state in case of any problems.

Step 2: Open functions.php

Go to your WordPress dashboard.
Navigate to Appearance > Theme Editor.
Select the functions.php file from the right sidebar.
Step 3: Identify Google Fonts Handle

To find the correct Google Fonts handle, you need to check the documentation of your theme or plugin. You can often find this in the functions.php file or in the source code of the installed WordPress theme. Alternatively, you can use the browser console to identify the loaded fonts.

Step 4: Add code

Add the following code at the end of the functions.php file. Replace 'theme-handle'* with the actual handle of the theme that loads the Google Fonts:

(code block)
function remove_google_fonts() {

wp_dequeue_style('theme-handle');

wp_deregister_style('theme-handle');

}

add_action('wp_enqueue_scripts', 'remove_google_fonts', 20);
(end of code block)

Step 5: Save changes

Click Update File to save the changes.

*A notice:

The 'theme-handle' is specific to each theme and plugin. An example could be 'twentytwenty-style' for the Twenty Twenty theme.

This adjustment will dequeue and unregister the code that loads Google Fonts, preventing the fonts from being loaded from external Google servers. This will help keep your website GDPR compliant.

If you are unsure or need help, we recommend that you seek professional support from an agency specializing in WordPress to ensure that all changes are made correctly and securely.

Google Fonts deactivated? Here's how to proceed
With the measures described, you can deactivate Google Fonts and thus avoid violations of data protection law.

Please note, however, that the fonts will no longer be usable after this and your website may appear in a different font. This is normal because it is now accessing standard fonts that are already on the web server.

After deactivation, it is important to check your website to make sure it continues to function correctly and is readable.

In the next section, we'll show you how to set up Google Fonts locally. This way, you can continue to use the fonts you want without violating the EU GDPR or being disadvantaged by poorer loading times.

Setting up Google Fonts in compliance with GDPR: How to do it step by step
Now we'll show you how to upload and use Google Fonts or your own fonts locally on your server. This will help you avoid data protection issues and ensure that the fonts continue to be displayed correctly.

There are various options for this, which we will introduce to you step by step below:

Setting up Google Fonts locally via plugins
The easiest way to set up Google Fonts in compliance with GDPR is to use special plugins. These plugins deactivate the direct connection to Google servers and enable local use of the fonts. To do this, the fonts are downloaded and saved on the web server.
Post Reply