Created
December 25, 2015 07:20
-
-
Save SriniBlog/56517bcbd09a601ca0ed to your computer and use it in GitHub Desktop.
This code snippet is used in functions.php file to add the google font in the head section. This works for wordpress with genesis framework
This file contains 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 the below code to functions.php file | |
/* | |
* OUTPUT in HTML file | |
* <link rel="stylesheet" id="google-fonts-css" href="//fonts.googleapis.com/css?family=Raleway%3A300%2C700%7CLato%3A700%2C400italic%2C400&ver=1.0.0" type="text/css" media="all"> | |
*/ | |
// Enqueue Google Fonts | |
add_action( 'wp_enqueue_scripts', 'genesis_sample_google_fonts' ); | |
function genesis_sample_google_fonts() { | |
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Raleway:300,700|Lato:700,400italic,400', array(), CHILD_THEME_VERSION ); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment