Skip to content

Instantly share code, notes, and snippets.

@misterebs
Created September 25, 2016 05:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save misterebs/148e231cdfdc95df2c0f6cb5c3576ec8 to your computer and use it in GitHub Desktop.
Custom font
add_action( 'wp_enqueue_scripts', 'custom_google_fonts' );
function custom_google_fonts() {
wp_enqueue_style( 'custom-font', "//fonts.googleapis.com/css?family=Roboto:400,300,100,500");
}
To include multiple fonts at once, add the | separator, like so
wp_enqueue_style( 'custom-font', "//fonts.googleapis.com/css?family=Roboto:400,300,100,500|Roboto+Slab:400,300,100,500");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment