How to add Google Fonts in WordPress manually

You want more fonts in your WordPress, you’ve come across Google Fonts but now you’re stuck on the installation? We got you.

If you’re not interested into coding and want a quick solution, we recommend choosing a plugin which will install everything you need in seconds and let you use free fonts without even looking at code. But if you want to learn how to do that by yourself and implement Google Fonts manually, you can do that easily – follow the instructions and you’ll be adding fonts like a pro in minutes.

  1. Open header.php file
  2. Choose a font you like from https://www.google.com/fonts
  3. Copy the “standard” code provided in step 3 which looks like this:

<link href=’http://fonts.googleapis.com/css?family=Merriweather’ rel=’stylesheet’ type=’text/css’>

Now that you have placed the link in header file so the font can be downloaded as soon as possible, you’re ready to use that font in your theme. Now you should open your CSS file and add new font where you want it to appear.

For example, you can change font for your paragraphs by placing this code into CSS file:

p {
font-family: "Merriweather", Times, serif;
}

It is simple as that. Now, you may also add fonts by using a different method. Import is actually not recommended because it doesn’t use parallel downloads so your theme will wait to load one font at a time and make everything much slower. We recommend using the previous technique, but if you still want to use the import method, you can do that in only two steps.

  1. Open Style.css file
  2. Paste the code you’ve got from Google Fonts @import section. It looks something like this:
    @import url(http://fonts.googleapis.com/css?family=Lora);

If you need to import more than just one font, you can add extra lines of codes, or to make it even more simple, just add “|” simbol between font names. Here’s an example:

@import url(http://fonts.googleapis.com/css?family=Lora|Monsterrat);

START YOUR OWN BLOG

This guide is an introduction to mastering the art of blogging. It provides easy to follow steps to start, maintain, and grow your blog.

Read the guide

Leave a Reply

Your email address will not be published. Required fields are marked *