Created
July 1, 2014 05:38
-
-
Save boluda/5c84ecdd4384281a6544 to your computer and use it in GitHub Desktop.
Register and enqueue Google Fonts (the right way)
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
/** | |
* Register and enqueue Google Fonts (the right way) | |
*/ | |
function jb_google_fonts() { | |
// register styles | |
wp_register_style('googlefont-oswald', 'http://fonts.googleapis.com/css?family=Oswald:400,300,700', array(), false, 'all'); | |
// enqueue styles | |
wp_enqueue_style('googlefont-oswald'); | |
} | |
add_action('wp_enqueue_scripts', 'jb_google_fonts'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment