Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action('wp_enqueue_scripts', function() {
- // get protocol used by current page
- $protocol = is_ssl() ? 'https' : 'http';
- // build list of font families to add
- $font_families = array();
- $font_families[] = 'The+Girl+Next+Door:400'; // only has normal/400
- // build arguments list for Google Fonts
- $fonts = array(
- 'family' => implode('|', $font_families),
- 'subset' => 'latin,latin-ext',
- );
- // enqueue the stylesheet
- wp_enqueue_style('website-fonts', add_query_arg($fonts, "$protocol://fonts.googleapis.com/css" ), array(), null);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement