- This topic has 15 replies, 2 voices, and was last updated 4 years, 8 months ago by Matt.
-
AuthorPosts
-
August 15, 2019 at 12:43 pm #985125Matt
I’ve spent ages trying to figure out where a load of unused Google fonts and variants are being called from.
Disabled all plugins and changed themes and it appears to be the GP theme.
Looking in the console I’ve discovered the following…
<link rel=’stylesheet’ id=’generate-fonts-css’ href=’//fonts.googleapis.com/css?family=Lato:regular,700|Droid+Serif:regular,italic,700,700italic|Lato:300,regular,500,600,700|Nunito:200,200italic,300,300italic,regular,italic,600,600italic,700,700italic,800,800italic,900,900italic|Montserrat:300,regular,500,600,700′ type=’text/css’ media=’all’ />
I’ve defined a small number of fonts & variations in the customiser, and also checked all my pages to make sure no others have crept in. I’ve even defined H4 & H5 in CSS as these were calling Montserrat.
I’ve searched all the CSS files but can’t find anything. It’s holding up the launch of my website.
Any ideas what’s going on and how to get rid of this mess of fonts?
Cheers
August 15, 2019 at 5:28 pm #985280TomLead DeveloperLead DeveloperHi there,
That request is generated by the Typography controls in the Customizer. Have you checked every single font family control in there to make sure those fonts/variants aren’t set? If the options in the Customizer aren’t set to Google Fonts, that request shouldn’t exist.
Let me know π
August 15, 2019 at 8:43 pm #985350MattHi Tom, Definitely 100% have updated the Typography controls to just use Lato Regular and 700.
Just to be safe I’ve activated the parent theme and done the same – but I still have the same problem.August 16, 2019 at 10:02 am #985926MattI’ve just created a post that included every type of formatting (H1-H5, paragraph, pre-formated, Quote) and then double checked using Chrome. There’s only one font and two or three variants.
Bit miffed.
August 16, 2019 at 10:16 am #985941TomLead DeveloperLead DeveloperStrange, any chance you can send me temporary admin login details so I can take a quick look? If so, shoot me an email here: https://generatepress.com/contact
If I can’t find the issue, we can always just unhook that function so GP doesn’t make any calls to Google.
August 16, 2019 at 10:41 am #985961MattI’ve added a user and emailed it to pre-sales. I hope this is the one you meant.
August 16, 2019 at 2:43 pm #986114TomLead DeveloperLead DeveloperHi there,
Your Typography module in GP Premium isn’t active. If you activate it, are you using those other fonts/variants in the premium typography fields?
August 16, 2019 at 3:13 pm #986127MattWhen I logged the issue – I’d disabled and removed the Premium plugin as I wasn’t using the features. I guess it was a hang-up that remained after the uninstall.
I’ve now reinstalled and enabled the plugin and worked my way through all typography.
https://fonts.googleapis.com/css?family=Lato:regular|Droid+Serif:regular,italic,700,700italic
I’m still seeing Droid+Serif but can’t find it anywhere. Any Idea?
Also, what do I need to do if I disable or uninstall Premium in future?
August 16, 2019 at 3:29 pm #986137TomLead DeveloperLead DeveloperIt could be from another module. For example, Secondary Navigation and Menu Plus both have typography settings.
These particular options in premium use filters that exist in the free theme, so once the option exists in the db, you can actually deactivate the premium features and the options will still exist. In this case, you’ll want to manually unset these options before deactivating GPP.
Let me know π
August 16, 2019 at 3:40 pm #986144MattDoh… Just noticed a separate call to Google with a shed load of requests
Doesn’t make any sense to me. I’ve activated the parent theme and updated all the fonts there but hasn’t made any difference.
August 16, 2019 at 3:42 pm #986147TomLead DeveloperLead DeveloperThat’s likely coming from a plugin you’re using.
There’s also a hard-coded request in the
header.php
file in your child theme.August 16, 2019 at 4:03 pm #986160MattSo… Now GP is no longer calling tons of fonts – Elementor is doing its own mass call of fonts.
It looks like GP is still calling Droid+Serif:regular,italic,700,700italic even after disabling all plugins. I’ve tried the parent theme and the font download shows there too. It doesn’t show when using Storefront theme.
I’ve enabled all GP premium features and been through Typography to make sure everything’s set to Lato Regular or 700/bold.
Do I need to check anywhere else other than the Typography section?
p.s
I added the header item for fonts I’d intended to use (Lato & Roboto – each in 2 weights).August 16, 2019 at 4:11 pm #986164TomLead DeveloperLead DeveloperThat’s strange, I’m not seeing where the Droid Serif font is coming from. Caching plugin maybe? Server caching?
Also, you can set it so the Body uses Lato, and everything else can be set to “inherit”. This will use Lato everywhere and makes it so you don’t need to check every single typography element.
If you’re going to load the fonts in the
header.php
anyways, you can just tell GP not to make the request:add_action( 'wp_enqueue_scripts', function() { wp_dequeue_style( 'generate-fonts' ); }, 100 );
August 16, 2019 at 4:22 pm #986173MattCleared the WP cache and server side is disabled at the mo.
I’ve used the functions.php snippet – that’s done the job nicely π
Now to figure out why Elementor isn’t playing ball <sigh>!
Thanks for your help.
August 16, 2019 at 4:23 pm #986175TomLead DeveloperLead DeveloperNo problem π
-
AuthorPosts
- You must be logged in to reply to this topic.