It’s most likely the best way for you to include the fonts on your website. It’s unlikely you need the kind of control the Javascript code provides and it’s more complex than you’d probably like. The Javascript code is part of the WebFont Loader, which is a Javascript library developed by Google and Typekit that will give you more control over font loading. The way will prevent that but may slow down your site because it’ll wait for the font to load, then show the content. On slow connections though, visitors to your site may see the so-called Flash of Unstyled Text (FOUT), your text will show in a different font, then switch to your Google font once that has loaded. The standard way to include web fonts will have the least impact on the speed of your site. So, which is the best way to add Google Fonts to your site? Open your child theme’s header.php and add the code between the and tags. Immediately below the comments declaring what theme it is and such. Option 2: your child theme’s style.css and add the css code: url() Open your child theme’s header.php and add the code, which is similar to this: īetween the and tags.
So, which is the best way to add Google Fonts to your site?.