-
AuthorPosts
-
July 12, 2019 at 9:46 am #1117995
Hi,
I have added the following code to my functions.php of my child theme but it does not work. Google fonts still loading (testet with Chrome developer console).add_action( 'init', 'enfold_customization_switch_fonts' ); function enfold_customization_switch_fonts() { global $avia; $avia->style->print_extra_output = false; }
Any ideas why and how to solve that?
Best regards,
MathuseoJuly 12, 2019 at 7:31 pm #1118158Hey Marcel,
Could you please give us a link to your website, we need more context to be able to help you.
Best regards,
VictoriaJuly 13, 2019 at 6:39 am #1118268Hi Victoria,
you can found all the information in private content area.
Thanks,
MathuseoJuly 13, 2019 at 12:29 pm #1118292Hi Mathuseo,
Best regards,
VictoriaJuly 15, 2019 at 7:26 am #1118691July 15, 2019 at 6:39 pm #1118888Hi Mathuseo,
Best regards,
VictoriaJuly 16, 2019 at 11:07 am #1119120Hi Victoria,
Best Regads,
MathuseoJuly 17, 2019 at 11:34 am #1119530Hi,
Thank you for the update.
This filter should prevent the google font script from rendering.
add_filter( 'avf_output_google_webfonts_script', 'avf_output_google_webfonts_script', 10, 1 ); function avf_output_google_webfonts_script( $activate ) { return false; }
// https://kriesi.at/support/topic/disable-google-font-loading-via-google/#post-969672
Best regards,
IsmaelJuly 22, 2019 at 1:14 pm #1120837Hi Ismael,
it works, thank you. Any idea why it does not work on my other website?
For further informaton please see private content below.
Best regards,
MathuseoJuly 22, 2019 at 11:04 pm #1121034Hi,
It should work for both web sites, I do not see the code on functions.php?
Best regards,
BasilisJuly 29, 2019 at 7:56 pm #1122881Hi Basilis,
the code is in function.php of child theme of course. Location is themes/enfold-child/. Please check backend > design > editor.
I add another website to private content. Here the code is not working as well. Google fonts is still loading. I have added the code to functions.php of child-theme as described above.
Can you please check these both websites why it is not working?
- This reply was modified 5 years, 4 months ago by Mathuseo.
July 29, 2019 at 9:21 pm #1122945Hi,
I did checked the frontpage and Google Fonts is still loaded. I think that it could be because of Google Maps integration. On subpages, without Google Maps integration, Google Fonts is not loaded.I think that is the explanation of the problem.
Any “Best practice” how to prevent loading Google Fonts with using Google Maps with Enfold?
July 30, 2019 at 4:04 am #1123027Hi,
Why are you trying to disable the google fonts? If the purpose is to prevent the site from connecting to the Google API, then using a map from the same source renders it pointless. Removing the font from the map application doesn’t change the fact that the site is still connecting to the Google Map API. Are you trying to make the site GDPR-compliant?
There is a way to prevent the default map font from loading but it’s not implemented in the theme.
// https://stackoverflow.com/questions/25523806/google-maps-v3-prevent-api-from-loading-roboto-font
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.