daniel-w
6/17/2015 - 9:55 PM

Enqueue Adobe TypeKit fonts in functions.php

Enqueue Adobe TypeKit fonts in functions.php

/**
 * Add Typekit Fonts
 */
function theme_typekit() {
    wp_enqueue_script('theme_typekit', '//use.typekit.net/xxxxxxx.js');
}

add_action('wp_enqueue_scripts', 'theme_typekit');

function theme_typekit_inline() {
    if (wp_script_is('theme_typekit', 'done')) { ?>
        <script>try {Typekit.load();}catch(e){}</script>
    <?php }
}

add_action('wp_head', 'theme_typekit_inline');