{"id":11714,"date":"2022-10-14T16:59:49","date_gmt":"2022-10-14T16:59:49","guid":{"rendered":"https:\/\/nieuw.wpprovider.nl\/this-is-how-wordpress-prevents-external-loading-of-google-fonts\/"},"modified":"2022-10-14T16:59:49","modified_gmt":"2022-10-14T16:59:49","slug":"this-is-how-wordpress-prevents-external-loading-of-google-fonts","status":"publish","type":"post","link":"https:\/\/nieuw.wpprovider.nl\/en\/this-is-how-wordpress-prevents-external-loading-of-google-fonts\/","title":{"rendered":"This is how WordPress prevents external loading of Google fonts"},"content":{"rendered":"<p>Even at the end of the year, it is still <strong>the<\/strong> topic among Web site administrators: What to do after a warning about Google Fonts?  <\/p>\n<div>  Earlier this year, there was already an <a href=\"https:\/\/rewis.io\/s\/u\/zH2\/\" target=\"_self\" rel=\"external nofollow noopener\">LG Munich ruling<\/a> regarding Google Fonts loaded from external Google servers.<br \/>\nHere it was ruled that this is not allowed for data protection reasons.<br \/>\nIn order not to go further into the question of whether the ruling is sensible or understandable, we can make one addition: namely, there are not only data protection reasons for loading fonts locally, it also has a positive effect on performance!<br \/>\nBut! what can you do if you get such a warning?     <\/p>\n<h2>Make sure Google Fonts are loaded externally<\/h2>\n<p>  You can easily check yourself that your website is really loading Google Fonts externally.<br \/>\nYou can do this through the Developer Console or the Developer Tools ( <kbd>Ctrl + Shift.<br \/>\n+ I <\/kbd>  or <kbd>F12<\/kbd>) of your browser.<br \/>\nIn Chrome you will find the information in the &#8220;Source Code&#8221; tab, in Firefox you can see if and which fonts are loaded via the Network Analysis tab.   <img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-4500 size-full\" src=\"https:\/\/nieuw.wpprovider.nl\/wp-content\/uploads\/Google-fonts-lokaal-inladen.jpg\" alt=\"\" width=\"1286\" height=\"469\" srcset=\"https:\/\/nieuw.wpprovider.nl\/wp-content\/uploads\/Google-fonts-lokaal-inladen.jpg 1286w, https:\/\/nieuw.wpprovider.nl\/wp-content\/uploads\/Google-fonts-lokaal-inladen-300x109.jpg 300w, https:\/\/nieuw.wpprovider.nl\/wp-content\/uploads\/Google-fonts-lokaal-inladen-1024x373.jpg 1024w, https:\/\/nieuw.wpprovider.nl\/wp-content\/uploads\/Google-fonts-lokaal-inladen-768x280.jpg 768w\" sizes=\"(max-width: 1286px) 100vw, 1286px\" \/>  Chrome&#8217;s developer tools show that a Google Font is loaded.<br \/>\nAlternatively, there are some Web sites that will tell you if your Web site is loading Google Fonts: https:\/\/www.e-recht24.de\/google-fonts-scanner https:\/\/webbkoll.dataskydd.net\/de\/ https:\/\/sicher3.de\/google-fonts-checker\/   <\/p>\n<p class=\"hinweis\">Note: Both the console and external services check only the URL you enter.<br \/>\nSo a check does not rule out whether you are using Google Fonts elsewhere on a subpage.   <kbd><\/kbd>  Consider whether to check certain pages or posts separately because other &#8220;functionalities&#8221; may have been used there, such as contact forms, popups, sliders and the like.<\/p>\n<h2>Google fonts blocking<\/h2>\n<p>  As usual, there are always several ways for WordPress to fix a problem.<br \/>\nFor those who prefer not to make manual changes, we show the simple method through a plugin.   <\/p>\n<h3>Plugins that block Google Fonts<\/h3>\n<p><a href=\"https:\/\/wordpress.org\/plugins\/local-google-fonts\/\" target=\"_blank\" rel=\"noopener\">Local Google Fonts<\/a> and <a href=\"https:\/\/wordpress.org\/plugins\/host-webfonts-local\/\" target=\"_blank\" rel=\"noopener\">OMGF<\/a> both have the advantage of not only preventing the loading of external fonts, but at the same time integrating locally used fonts, so nothing changes in the appearance of your Web site.<br \/>\nThe only difference is that Google Fonts are now stored locally and loaded from there.<br \/>\nThere is no longer a connection to Google Fonts&#8217; servers.<br \/>\nIf you only want to block the Google Fonts and integrate them locally manually, you can also use <a href=\"https:\/\/de.borlabs.io\/borlabs-font-blocker\/\" target=\"_self\" rel=\"external nofollow noopener\">Borlabs&#8217; Font Blocker<\/a>.<br \/>\nSome cache or optimization plug-ins also offer the ability to block Google Fonts, an example is      <a href=\"https:\/\/wordpress.org\/plugins\/autoptimize\/\" rel=\"nofollow noopener\" target=\"_blank\"><a href=\"https:\/\/wordpress.org\/plugins\/autoptimize\/\" target=\"_blank\" rel=\"noopener\">Autoptimize<\/a><\/a><\/p>\n<h3>Options for themes and plugins<\/h3>\n<p>  Meanwhile, many themes and also some plugins already offer the option to prevent the loading of Google Fonts and\/or the loading of locally stored fonts.<br \/>\nSo check the documentation of your theme or contact the developers or the corresponding support forums.<br \/>\nOften you are not the only one looking for help with this.    <\/p>\n<h3>Google Fonts manual blocking<\/h3>\n<p>  Of course, there is also the possibility of blocking the loading of Google Fonts via the functions.php of your child theme.<br \/>\nFor standard WordPress themes, the required code is as follows: <\/p>\n<pre class=\"wp-block-code\">add_action( 'wp_print_styles', 'remove_google_fonts', 1);\nfunction remove_google_fonts() {\nwp_dequeue_style( 'twentyseventeen-fonts' );\n}<\/pre>\n<p> Here you have to use the <code>$handle<\/code> (here <code>twentyseventeen-fonts<\/code>), depending on the theme used.<br \/>\nSome examples:    <\/p>\n<ul>\n<li>Twenty Seventeen &#8211; twentyseventeen-fonts<\/li>\n<li>Divi &#8211; divi fonts<\/li>\n<li>Genesis Sample &#8211; genesis-sample-fonts<\/li>\n<\/ul>\n<p>  If that doesn&#8217;t work, I recommend searching Google for &#8220;remove google fonts + &#8220;name theme&#8221;&#8221;  <\/p>\n<h2>Check<\/h2>\n<p>  Whichever way you ultimately choose to stop the external loading of Google Fonts, check afterwards that it has worked.<br \/>\nAdditionally a side note, external content loaded onto your website via iFrames cannot be affected via the above methods.<br \/>\nIf you have any questions about this topic feel free to contact us!    <\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Even at the end of the year, it is still the topic among Web site administrators: What to do after a warning about Google Fonts? Earlier this year, there was already an LG Munich ruling regarding Google Fonts loaded from external Google servers. Here it was ruled that this is not allowed for data protection [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":10833,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-11714","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-geen-onderdeel-van-een-categorie"],"acf":[],"_links":{"self":[{"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/posts\/11714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/comments?post=11714"}],"version-history":[{"count":0,"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/posts\/11714\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/media\/10833"}],"wp:attachment":[{"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/media?parent=11714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/categories?post=11714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nieuw.wpprovider.nl\/en\/wp-json\/wp\/v2\/tags?post=11714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}