- This topic has 8 replies, 4 voices, and was last updated 2 years, 5 months ago by
Andrew Misplon.
Tagged: fonts local fonts.googleapi.com
- AuthorPosts
- October 26, 2022 at 7:05 pm #17083
Andrew MisplonKeymasterHi, thanks for reaching out.
I’ll need to introduce filters in the future to accommodate GDPR concerning Google Fonts. For now, you could perhaps use https://wordpress.org/plugins/host-webfonts-local/. I’ve tested it, and it seems to work as required:
https://purothemes.com/wp-content/uploads/2022/10/OMGF_‹_Polestar_—_WordPress-scaled.jpg
Don’t load must be manually selected in the plugin options page.
October 27, 2022 at 3:12 pm #17087
Andrew MisplonKeymasterHi again. The screenshot I posted previously was for Polestar. Please, see the screenshot below for Ultra:
https://purothemes.com/wp-content/uploads/2022/10/ultra-fonts-scaled.jpg
Thanks
Andrew
October 29, 2022 at 7:08 pm #17091
WegkreuzParticipantHi,
I tried the Plugins OMGF (as proposed) and Local Google Fonts.
For some cases it works, i.e. fonts are loaded from the local server.
However, if I open the developer console in Google Chrome, there is a connection to fonts.gstatic.com.
I my case, dyncamic css seems to be produces by the theme. As Initiator there is an entry with “css?family=Cuprum:400|Cuprum:700&display=block” and the URL “https://fonts.googleapis.com/css?family=Cuprum:400|Cuprum:700&display=block”Perhaps, the File: \wp-content\themes\ultra\inc\customizer\customizer.php, Line 86 and other is the problem:
/**
* Echo all the CSS
*/
function css() {
// Start by importing Google web fonts
$return = ‘<style type=”text/css” id=”customizer-css”>’;
….
$return .= ‘@import url(//fonts.googleapis.com/css?family=’ . implode( ‘|’, $import ) . ‘&display=block); ‘;How can we fix the problem urgently?
Is it possible to modify the file so that it refers to a local URL?
November 15, 2022 at 3:17 pm #17110
knuppParticipantHello Andrew,
I am having the exact same issue. I have tried to get the fonts with a plugin called “Local google fonts”, and I have tried OMGF as well as you recommended, I have also browsed every site in order to load everything but both plugins aren’t able to find all font loadings from google on this website, while a random google-fonts-checker immediately does.
How can I pinpoint which elements are using the google-loaded fonts, and change the source?The site I need help with is on http://www.wilde-saiten.de.
Thank you for your help!
SonjaNovember 16, 2022 at 2:26 pm #17120
Andrew MisplonKeymasterHi Sonja
I’ve replied to the thread you opened. Thanks.
November 16, 2022 at 5:00 pm #17126
Andrew MisplonKeymasterHi Wegkreuz
Apologies for the delay. If you can perhaps open a new support thread, I’d be happy to lend a hand.
Thanks
Andrew
November 19, 2022 at 10:45 pm #17138
Andrew MisplonKeymasterThe following can be tried in Code Snippets set to load on the site front-end:
function ultra_child_setup() { if ( function_exists( 'siteorigin_webfonts_remove_font' ) ) { siteorigin_webfonts_remove_font( 'Muli' ); siteorigin_webfonts_remove_font( 'Lato' ); } add_filter( 'ultra_import_google_fonts', '__return_false' ); } add_action( 'after_setup_theme', 'ultra_child_setup', 30 );
Thanks.
November 20, 2022 at 10:55 am #17140
Andrew MisplonKeymasterI’ve updated the above function to avoid an error when switching themes. Thanks.
- AuthorPosts
The topic ‘Change from loading fonts from fonts.googleapis.com to lokal’ is closed to new replies.