family=Lato:400,700|Montserrat:400,700|Roboto:400,700
. This loads all 3 fonts in 2 weights each for the page. But it’s not going to change what your theme does when you select various fonts. You could output such a combined link on your header template, but your theme will still try to load them again individually.
The real issue lies with your theme’s method of loading fonts, so you should be asking your theme’s devs, not Google. Google will just tell you what I did in my first line.
]]>function font_scripts() {
wp_enqueue_style('montserrat', 'https://fonts.googleapis.com/css?family=Montserrat:400,700&display=swap');
}
add_action( 'wp_enqueue_scripts', 'font_scripts' );
]]>
You should be enqueueing them in your functions.php
function font_scripts() {
wp_enqueue_style('montserrat', 'https://fonts.googleapis.com/css?family=Montserrat:400,700&display=swap');
}
add_action( 'wp_enqueue_scripts', 'font_scripts' );
What does is change exactly?
I actually wrote that code into my function.php but the number of css didnt change. do i need to change the font in my brooklyn theme to “theme font” instead of “google font”?
But then it will probably be setting the various styles for page elements to be that generic font and the Google fonts you are loading will not be used. Try overriding the theme’s style rules as needed with your own font-family rules in the Additional CSS panel of the customizer.
]]>