• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

WPbasics - A beginner's resource for WordPress

  • Blog
    • Tutorials
    • Articles
    • Showcase
    • Themes
    • Plugins
  • Recommended Hosts
  • About
  • Contact Us

Add Google Fonts to your WordPress site

Last updated on July 17, 2019 Leave a Comment

Learn how to add Google Fonts to your WordPress website.

In this tutorial I will show you how to jazz up your website by adding Google Fonts to your website.  You will learn how to select Google Fonts, add code to your functions.php file, and to your styls.css file.  As always, I will be using the Genesis Framework.  I used a modified version of the Genesis sample theme.  You can find the theme here.  Below you will find the PHP and CSS code. In seven easy steps, you will learn how to customize your typography.  Let’s get started!!

Step 1

Add this to your functions.php file

<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Enqueue Lato Google font
add_action( 'wp_enqueue_scripts', 'wpb_load_google_fonts' );
function wpb_load_google_fonts() {
	wp_enqueue_style( 'google-font-lato', '//fonts.googleapis.com/css?family=Lato:300,700', array(), CHILD_THEME_VERSION );
}

Step 2

Select the font you would like to use from the Google Fonts website.  Click here

Step 3

Click on the quick use button

Google Fonts

Step 4

Review the options you would like for your font and then copy the name of the font.

Google Fonts2

Step 5

Add the copied font name to your functions.php file

google fonts3

Step 6

Copy the font name from google fonts

google fonts4

Step 7

Add the font name to your CSS style sheet.

google fonts5

Tagged With: fonts

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar

Search this site

Popular Posts

  • How to copy a live WordPress site to a local host | Duplicator
  • How to add a jQuery UI Accordion to WordPress
  • How to copy a live WordPress site to a localhost
  • How to Use FileZilla | FTP Client
  • How to Create a Localhost with local by Flywheel

Recent Posts

  • Learn PHP in 15 Minutes
  • How to Install a MailChimp Popup in WordPress
  • Googles reCaptcha slow mobile site
  • Check if your site is indexed by Search Engines
  • ACF Blocks | Gutenberg
SEE MORE POSTS

Footer

Site Links

  • Affiliate Disclosure

Contact

  • Email
  • Twitter
  • Facebook

About WPbasics

WPbasics was created to assist WordPress Beginners. This site provides tutorial, reviews, and access to deals on products used by WordPress users.

Copyright © 2023 · WPbasics ·

Enter your name and email and get the weekly newsletter... it's FREE!
Signup today and be the first to get notified on new updates
Your information will *never* be shared or sold to a 3rd party.