Created
June 23, 2015 20:12
-
-
Save lepittenger/dab3f39c00d5db2ff8e4 to your computer and use it in GitHub Desktop.
Enqueue Google Font Weights
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
add_action( 'wp_enqueue_scripts', 'enqueue_google_fonts' ); | |
function enqueue_google_fonts() { | |
// Get the theme data, so we can handle stylesheet versioning in one place | |
$theme = wp_get_theme(); | |
// Enqueue the Google fonts | |
$font_url = add_query_arg( 'family', urlencode( 'Cabin:400,700' ), '//fonts.googleapis.com/css' ); | |
wp_enqueue_style( 'google_font_cabin', $font_url, array(), $theme->Version ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment