Created
November 28, 2014 16:19
-
-
Save j-mccarthy/878bf0833c09330f8597 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Remove when using this snippet | |
function child_load_google_fonts() { | |
// Setup font arguments | |
$query_args = array( | |
'family' => 'Lato:300,400,500,700', // Notice the new 400 weight!!! | |
); | |
// A safe way to register a CSS style file for later use | |
wp_register_style( 'google-fonts', add_query_arg( $query_args, "//fonts.googleapis.com/css" ), array(), null ); | |
// A safe way to add/enqueue a CSS style file to a WordPress generated page | |
wp_enqueue_style( 'google-fonts' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'child_load_google_fonts' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment