Home › Forums › Weaver Xtreme Theme › can’t find where google fonts are being included
- This topic has 3 replies, 4 voices, and was last updated 1 year, 12 months ago by
Weaver.
-
AuthorPosts
-
September 12, 2024 at 20:05 UTC - Views: 25 #75029
ecat
ParticipantI have been running Weaver Xtreme Plus from the beginning, with a child theme, and Weaver II Pro before that. I have found that code for google fonts is being inserted, and have searched everywhere to figure out where it comes from. I want to get it out as I think it is causing performance problems. Here is the code I don’t want:
<link href=’http://localhost:8888/awinthr/wp-content/themes/weaver-xtreme/assets/css/fonts/google/google-fonts.min.css?ver=6.6′ rel=’stylesheet’ type=’text/css’> <link href=’http://localhost:8888/awinthr/wp-content/plugins/weaver-xtreme-plus/includes/fonts/google-plus-fonts.min.css?ver=6.2′ rel=’stylesheet’ type=’text/css’>”>http://<!– Self-host Google Fonts –><link href=’http://localhost:8888/awinthr/wp-content/themes/weaver-xtreme/assets/css/fonts/google/google-fonts.min.css?ver=6.6′ rel=’stylesheet’ type=’text/css’> <link href=’http://localhost:8888/awinthr/wp-content/plugins/weaver-xtreme-plus/includes/fonts/google-plus-fonts.min.css?ver=6.2′ rel=’stylesheet’ type=’text/css’>”> <link href=’http://localhost:8888/awinthr/wp-content/themes/weaver-xtreme/assets/css/fonts/google/google-fonts.min.css?ver=6.6′ rel=’stylesheet’ type=’text/css’>
<link href=’http://localhost:8888/awinthr/wp-content/themes/weaver-xtreme/assets/css/fonts/google/google-fonts.min.css?ver=6.6′ rel=’stylesheet’ type=’text/css’> <link href=’http://localhost:8888/awinthr/wp-content/plugins/weaver-xtreme-plus/includes/fonts/google-plus-fonts.min.css?ver=6.2′ rel=’stylesheet’ type=’text/css’>”> <link href=’http://localhost:8888/awinthr/wp-content/plugins/weaver-xtreme-plus/includes/fonts/google-plus-fonts.min.css?ver=6.2′ rel=’stylesheet’ type=’text/css’>
I have searched the functions in the child theme. and things like insert HTML, etc.
Do you have any suggestions as to where to look?
September 13, 2024 at 00:14 UTC - Views: 21 #75030September 13, 2024 at 01:13 UTC - Views: 27 #75031User
ModeratorSince V6.2 there has been a total integration and self-hosting of both standard Weaver Xtreme and Plus Google Fonts.
With that integration, personally, I did not find any slowing of my main site, as the total Xtreme font files are only <62.5 KB.
However, as all Xtreme CSS and JS files are already compressed, re-compressing (minimizing) them again, or combining (merging) them will lead to unpredictable bad results.
Please check on your optimization plugin that you’ve excluded all Xtreme CSS and JS files in the following path:
/wp-content/themes/weaver-xtreme/Please also check that the Xtreme CSS files are set to Async:
/wp-content/themes/weaver-xtreme/assets/css/fonts/google/google-fonts.css /wp-content/themes/weaver-xtreme/assets/css/fonts.min.css /wp-content/themes/weaver-xtreme/assets/css/style-weaverx.min.cssRegards.
September 14, 2024 at 15:37 UTC - Views: 22 #75034Weaver
KeymasterAre you loading your own alternative fonts? Are you only using the “standard” default fonts?
Loading fonts is really very important. The main reason is how the site will display on phones.
Not loading any fonts leaves the site only able to display the default fonts. For phones, the only fonts can be just a basic sans-serif font. Maybe a serif font, too.
So if you’ve selected any fonts, or even use just “web safe” fonts, your site will not look good on phones.
And the way the font loading works, a font is not loaded if it is not used. So font loading is really one of the most optimized features of most any WordPress theme, including Weaver Xtreme. As @User noted, there really should be no measurable gain from loading the fonts. The data is small (less than even a fairly small image), it will be cached by any decent browser / host. The links to the fonts are static. Unused fonts aren’t loaded. And the EU regulations do not allow using Google hosted fonts (thus the change to self loading fonts.)
That said, fonts are loaded via the WP add_action: weaverx_load_fonts which is conditionally used by the theme. So a child could used its own WP action via add_action to load (or not load) whatever fonts the child needs. If the child has defined its own action, Weaver will not load its own.
-
AuthorPosts
- You must be logged in to reply to this topic.

