Site logo

Archived topic

Support for Google Fonts /css2 Variable Fonts

2 replies · Started by Jason on March 28, 2022

Viewing posts 1–3 of 3

For example:

return apply_filters( 'generate_google_fonts_uri', $google_fonts_uri );

Hi Jason,

There is no filter to modify the “endpoint”. /css works with variants of multiple font as well but an alternative to modifying the GP files manually to make the endpoint /css2 is to enqueue the fonts manually.

You can do this through a Hook Element or a plugin like Code Snippets.

See: https://www.wpbeginner.com/wp-themes/how-add-google-web-fonts-wordpress-themes/#:~:text=Properly%20Enqueuing%20Google%20Fonts%20in%20WordPress

Make sure to toggle Google Fonts off when you add it as a Font in Appearance > Customize > Typography: https://share.getcloudapp.com/wbuzKgr9

We’ll ask tom about this. Hope this clarifies. :)

This archived topic is closed to new replies.