Skip to content

Instantly share code, notes, and snippets.

@PittsburghChris
Forked from studiopress/functions.php
Last active December 29, 2015 00:29
Show Gist options
  • Save PittsburghChris/7586814 to your computer and use it in GitHub Desktop.
Save PittsburghChris/7586814 to your computer and use it in GitHub Desktop.
How to add Google Fonts to an HTML5-compatible Genesis child theme after 2013.
<?php
//* Do NOT include the opening php tag
//* Enqueue Lato Google font
add_action( 'wp_enqueue_scripts', 'sp_load_google_fonts', 5);
function sp_load_google_fonts() {
wp_enqueue_style( 'google-font-lato', '//fonts.googleapis.com/css?family=Lato:300,700', array(), CHILD_THEME_VERSION );
}
@PittsburghChris
Copy link
Author

To the StudioPress recommendation: I added the priority "5", as seen in the WPBeginner's demo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment