2

Add Google fonts to your Divi Theme – ACTUAL CODE

Adding extra Google fonts to the Divi theme is extremely easy, even if you're new to coding. There is a video out by a divi examples website, but I was frustrated as the video was over 10 minutes and only barely got to the point … and didn't even link to showing you the code. So, below you'll find the exact code you can use to add any extra Google font to your Divi (or any elegant themes theme actually) theme.

Big important note: this code will only add the additional Google fonts to the DIVI Builder, and NOT to the WordPress Theme Customizer (the place where you can set fonts for the whole site).

In DIVI 2.7 and higher Elegant themes moved functions around, so this article is for those of use using the latest versions only. 🙂

Here is the code I used to add one additional Google font (‘Vidaloka' … my additional font is at the bottom):

The code format is very simple and remember the final comma at the end.

You can very easily just replace the Vidaloka code set I added above and use that. To explain that one: I'm using the ‘Vidaloka' font (just copy paste the name from Google's font list), it has the font weights (font weight is if it's thin, bold or otherwise): 200 (pretty thin), 300, 400 (usually the normal weight), or 700 (bold). Latin is just the language base set, generally …. leave that alone. 😀 And Type is the usual font stuff of Serif, sans-serif or cursive. Yes there are more options for each but for the most part you won't need more than that.

  • Dawn Leighton says:

    Thank you, this is refreshingly straight and to the point!
    Now where to place the code? (Apologies if I’ve missed something)

    • Hey Dawn,

      Thanks for your kind words. You’ll need to put this code into your child theme’s function.php file or you can use one of the many custom functions plugins available from the WP plugin search screen. 🙂

      Hope that helps!

  • >