One of the important elements in web design is typography. Simply said, using the right typography on your WordPress themes gives some effect on the overall design of the site. Besides the normal font such as Arial, Verdana, Times, just to name a few, there are many custom fonts available from various providers – Google Web Fonts, Typekit, #font-face and etc. This gives us lots of choices.
In this article, we’re going to learn how to use Google Custom Fonts in WordPress without using any WordPress plugin.
To use Google Custom fonts in your theme, first you need to register the fonts using wp_register_style
and wp_enqueue_style
. You may use the following code. You may paste the code in functions.php
of your child theme, or even better in your functionality plugin.
The snippet above will load Rock Salt and Neucha fonts and to use it, simply add 'Rock Salt'
or 'Neucha'
anywhere you would like the font to be used as shown in the example above.
Leave a Reply