Created
June 11, 2013 14:42
-
-
Save colorful-tones/5757402 to your computer and use it in GitHub Desktop.
Enqueue Typekit fonts for WordPress
This file contains 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 | |
// TypeKit | |
wp_enqueue_script( 'elp-typekit', '//use.typekit.net/YOUR_KIT_NUMBER_ID.js'); | |
function elp_typekit_inline() { | |
if ( wp_script_is( 'elp-typekit', 'done' ) ) { ?> | |
<script type="text/javascript">try{Typekit.load();}catch(e){}</script> | |
<?php } | |
} | |
add_action( 'wp_head', 'elp_typekit_inline' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment