- This topic has 4 replies, 4 voices, and was last updated 9 years ago by .
- The forum ‘General Discussion’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
How do I import the google fonts onto the metro theme please?
Add the following line at the top of the style.css file, just before the 01 Defaults section;
Many thanks, although it doesnt seem to be working on this theme, in the functions.php file there is a google font upload text that I am not familiar with.
Did you ever figure this out?
@bleubeard - Is this an issue for you as well?
The advice Peter gave is accurate. You can add Google fonts by either a) using an @import rule in the stylesheet (Peter's advice) OR b) using wp_enqueue_style() in your child theme's functions.php. In other words, do 1 or the other, not both.
Metro uses method (b). You can stick with that or change it.
All you need to change is the URL. This is the value that is in single quotes in Peter's example. It's the 2nd parameter of the call to wp_enqueue_style() in the Metro functions.php. You get that URL from Google's web fonts site based on the fonts you want to load.
Peter's method is safer, because a typo in CSS won't break your site, but a typo in your functions.php will.
© 2022 WPEngine, Inc.