How to modify the theme files to add &display=swap for the google font css url? To fix this Ensure text remains visible during webfont load. I'm using Source Sans Pro. It seems like it's hard to concat this parameter string &display=swap to the variable $fonts_url
Hi!
How to modify the theme files to add &display=swap for the google font css url? To fix this Ensure text remains visible during webfont load. I'm using Source Sans Pro. It seems like it's hard to concat this parameter string &display=swap to the variable $fonts_url
Hi!
I already solve but can you recommend something if it is the right way to add it. Thank you
Hi,
yes, in my mind the simplest solution use filter.
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver
Hi, how to do that in your theme functions.php do you have example for the code?
Hi,
Try to deregister:
if($fonts_url = thegem_google_fonts_url()) { wp_enqueue_style( 'thegem-google-fonts', $fonts_url); }and add new one with your function
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver