Loading fonts from Google Fonts and others can be a problem according to the privacy legislation in some countries of the European Union so sometimes it is convenient to deactivate them.
If you use the Astra theme and have this need the process is not complicated.
The first thing you have to do is to save the fonts locally in your server.
Once this is done the next step is to add this code to the functions.php file of the Astra child theme:
Once this is done you can use the customizer to configure Astra to your liking. When you’re done take a look at the source code of the page to identify the Fonts that are loaded on the page.
All that’s left is to use the Google Webfont Assistant to generate the required CSS and download the font files you need. Add it to the child theme’s style.css file and your local Google Fonts will be loaded instead of the remote ones.
Important Note: Since Astra 3.3, default font icons have been replaced by SVG icons so, if you enable SVG support, the astra.woof font file won’t be loaded anymore. Thus, the above code would be no longer needed unless you want to disable SVG support.
1 thought on “How to disable Astra theme Fonts (updated)”
Sorry this does’t work any longer. Do you have a newer version?