1. Home
  2. /
  3. Blog
  4. /
  5. Google Fonts in Parallax...
  6. /
  7. Pasting Google Font Code...

Pasting Google Font Code into functions.php in Parallax Pro theme

Adding Google Font code to the Parallax Pro theme

This is important!
Only do this if you can log in using ftp or your cPanel to repair any damage you might do.

One typo in a php document can disable your entire website. So be careful!

Go to Appearance > Editor > Theme Functions (functions.php)

Appearance Editor

You should already be editing your active theme. Parallax Pro in our case, but it makes sense to check. Then click the Theme Functions (functions.php) option.

Edit Theme Functions

Or better still log in using ftp and open your functions.php file.

Find…
wp_enqueue_style(

wp Enqueue code

We need to edit a small part of this long line of code.
Replace this code with the Google Fonts code

Highlight the code starting with the word: family= and continue until you reach the first single quote mark. We highlight up to but do NOT include the single quote mark.

It is very important that you replace exactly the right code. If you get this wrong your site could be disabled.

You can NOT use WordPress to fix this!

Do NOT delete the ? Or the single quote mark ‘

This is the code I got from Google fonts…
family=Lato|Josefin+Slab

So I very carefully replace…
family=Montserrat|Sorts+Mill+Goudy
with
family=Lato|Josefin+Slab

I did not change any other code in functions.php

I clicked the blue update button to save my changes.

Now I can move on to edit the Parallax Pro style.css file.

If you do break your website.

  • You’ll have to log in using ftp or cPanel.
  • Open the wp-content folder
  • Open the themes folder
  • Open the Parallax Pro folder
  • And then replace or repair functions.php

View the next page in this tutorial