Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #617202

    Hey there,

    I’ve read every topic on this subject that I could find in the forums, but still can’t get my Typekit font to work on my X child theme.

    I’ve created a Kit with Adobe for the font Proxima Nova. This is the Javascript that they ask me to embed:

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

    I read in a previous post that I should put that script in my functions.php file, sandwiched in between some other code that I don’t really understand so I pasted this right into the bottom of my functions.php file:

    add_action('wp_head','custom_typekit_head');
    
    function custom_typekit_head() { ?>
    
    <script src="https://use.typekit.net/fjq3yog.js"></script>
    <script>try{Typekit.load({ async: true });}catch(e){}</script>
    
    <?php } ?>

    I’ll attach a screenshot.

    I saw on another forum post that I should add in some Custom CSS in my Customizer to tell the site to use the font, so I entered this into the custom CSS box:

    h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
    font-family: "proxima-nova", sans-serif; !important;
    }
    
    p {
    font-family: "proxima-nova", serif; !important;
    }
    

    I’ve saved everything, updated everything, published my typekit and waited for over an hour, but I still can’t get Proxima Nova to show up in the typography dropdown lists inside the Customizer.

    I want to be able to select Proxima Nova for my headings and body. Could I get some help in making this happen?

    Thank you in advance.

    #617207
    This reply has been marked as private.
    #617492

    Friech
    Moderator

    Hi There,

    Thanks for writing in! Your site is under construction; please provide us login credentials in private reply, so we can take a closer look. Sorry for the confusion but that code wont add your custom font on Typography drop down, but will make you able to use that font on CSS.

    e.g.
    This code will make all your heading font a Proxima nova

    h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
    font-family: "proxima-nova", sans-serif; !important;
    }

    While this one make all the paragraph text a Proxima-nova

    body p {
    font-family: "proxima-nova", serif; !important;
    }

    You can add this under Custom > CSS in the Customizer.

    Hope it helps, Cheers!