How to Add Google Fonts in WordPress Post Editor
Fonts are one of the most important aspects of your WordPress blog, and in case you didn’t know Google has a library of about 300 webfonts that you can use on your WordPress site. Because they are hosted on Google’s servers they load quickly and they are also open source so you are free to use them as you wish. In this article we are going to show you how to easily access these fonts by using a plugin.
6 Easy Ways to Add Google Fonts to WordPress for Custom Typography
You should enqueue the weights you need. For example if you need the light font weight version you’d include 300 as well, otherwise it will just show the normal weight (400) on elements where you have it set to 300. And as for the 400i, if it’s not added then the browser automatically figures out how to display the italicized text. Same applies for 700 (bold), if not loaded the browser will use the regular (400) version and make it bold, which may look different from the actual bold version of the font.
2 Ways to Add Google Fonts to WordPress Website
Be careful to not modify the parent theme in either case if you’re using one. As parent theme tends to upgrade, the next update will remove all your changes. So no matter if you’re using the header.php or WordPress function, add them to the child theme only. Additionally, theme framework/parent theme, as well as WordPress, provide enough hooks/actions to add Google fonts to the child theme.