Site logo

Archived topic

Typekit woes

21 replies · Started by Shehzad on November 9, 2017

Viewing posts 16–22 of 22

Hi,
I'm adding Typekit font here as per this thread.. I have these questions:

A.
Adobe says about the js code:
"Make sure it goes near the top of the <head> tag"

.. and Tom says:
"in the wp_footer hook"

so which is really best?

B.
I don't need Tom's step 2 right?
https://www.screencast.com/t/0aqJhavEgj8Z
to specify css right since I can select my newly added Typekit fonts directly in Customizer.. correct?

C.
Is there any way to add a title/header in the Customizer like we have:
System Fonts
Google Fonts
Would be nice to be able to add
TypeKit (or Typekit Fonts or whatever some sort of customized title) AND have it show up first in the dropdown..

T H A N K S

Any chance you can open a new topic for your question?

Thanks!

Hi Tom
I'm struggling to load the typeKit fonts as well. I've installed the hook and inserted the TypeKit code in to the WP_head, and activated for the entire site, but the font still isn't showing in the list.

http://146.66.104.174/~ambconst/thethirstyelephant.com/
(development site)

Any ideas?
Gene

Gene - Assume you are now using Adobe Fonts since the name change away from Typekit?

I found I had to download the Code Snippets plugin (https://wordpress.org/plugins/code-snippets/)

Then add this code:

add_filter( 'generate_typography_default_fonts', 'tu_add_typekit_fonts' );
function tu_add_typekit_fonts( $fonts ) {
    $fonts[] = 'name-of-your-font';

    return $fonts;
}

Make sure you select "Run snippet everywhere".

That was the missing bit of the puzzle for me.

Thanks, Robin! That's the right way to do it :)

Thanks Robin, (and Tom). Thanks for your reply. This did the trick :)

Awesome :)

This archived topic is closed to new replies.