Created
October 26, 2016 06:28
-
-
Save yanknudtskov/ba40448889d3d3964c69ef6a6f2ae5d1 to your computer and use it in GitHub Desktop.
Using Adobe TypeKit and Google Fonts with WordPress
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
| <?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