Site logo

Archived topic

Typekit Fonts

5 replies · Started by Grischa on July 11, 2017

Viewing posts 1–6 of 6

Hi.

I tried both typekit codes the wp_head hook but in has no effect.
I also have a this default code below in the typekit plugin settings together with H1,H2..

How exactly do I have to put the code in?
These are the two code options from Typekit:

1. Default

<script src="https://use.typekit.net/rdw7ftf.js"></script>
<script>try{Typekit.load({ async: true });}catch(e){}</script>

2. Advanced

<script>
  (function(d) {
    var config = {
      kitId: 'rdw7ftf',
      scriptTimeout: 3000,
      async: true
    },
    h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
  })(document);
</script>

Thanks for your help.

Hi Leo.

I did read that one as well and it doesn't seem to work unfortunately.

You've tried adding this into the wp_head hook?:

<script src="https://use.typekit.net/rdw7ftf.js"></script>
<script>try{Typekit.load({ async: true });}catch(e){}</script>

I did. No change.

Once that code is added, you need to add your font to your elements using CSS. Have you done that?

This archived topic is closed to new replies.