Skip to content

Instantly share code, notes, and snippets.

@yanknudtskov
Created October 26, 2016 06:28
Show Gist options
  • Save yanknudtskov/ba40448889d3d3964c69ef6a6f2ae5d1 to your computer and use it in GitHub Desktop.
Save yanknudtskov/ba40448889d3d3964c69ef6a6f2ae5d1 to your computer and use it in GitHub Desktop.
Using Adobe TypeKit and Google Fonts with WordPress
<?php
function yanco_scripts() {
if( !is_admin() ) {
$query_args = array(
'family' => 'Open+Sans:300,500,700',
'subset' => 'latin,latin-ext',
wp_register_script( 'adobe-typekit', 'https://use.typekit.net/jkr3fxw.js');
wp_enqueue_script( 'adobe-typekit' );
wp_register_style( 'yanco-google-fonts', add_query_arg( $query_args, "//fonts.googleapis.com/css" ), array(), null );
wp_enqueue_style('yanco-google-fonts' );
);
}
}
add_action( 'wp_enqueue_scripts', 'yanco_scripts' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment