Forked from yanknudtskov/adobe-typekit-google-fonts.php
Created
June 18, 2018 06:30
-
-
Save INDIAN2020/0afa53d1dccb79eaacf12402c858077f 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