• I’m trying to upload and implement a new font I purchased, called MuseoSans. I’ve uploaded the necessary files and referenced the kit in the header, yet the font is only showing up on the home page of my site, http://www.richardjamespalin.com. I figure the updates I make in the editor are universal, so why is the font not working on all pages?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    From what I can tell the your font.css file is being called from the wrong source. On every page it’s being called from the current location rather than the root of your site.

    Pretty simple fix

    In your header.php you have:

    <link rel="stylesheet" type="text/css" href="MyFontsWebfontsKit.css" >

    this would probably work only on your home page, but most certainly will not for the rest of the site.

    <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/MyFontsWebfontsKit.css" />

    -or-

    <link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet_directory_uri(); ?>/MyFontsWebfontsKit.css" />

    depends if this is a Child or a Parent Theme.

    You can also do an import from your style.css as well:

    @import url('../../MyFontsWebfontsKit.css);

    Thanks,
    Emil

    Thread Starter richpalin

    (@richpalin)

    @emil

    So I tried replacing that line in header.php with both of your suggestions, however neither one fixed the issue.

    @jcastaneda

    Would I want to do this within the CSS, or in the path that the myfontswebfontskit.css is called in the header?

    Thread Starter richpalin

    (@richpalin)

    I solved the issue, all I did in the header was change
    <link rel=”stylesheet” type=”text/css” href=”MyFontsWebfontsKit.css” >
    to
    <link rel=”stylesheet” type=”text/css” href=”/MyFontsWebfontsKit.css” >

    The “/” made all the difference

    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    I’m glad you were able to solve it. Was going to respond a little sooner but I had to leave for work. The one bit of advice I would say is to try and use a dynamic way of linking the stylesheet if you ever change your permalink structure. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘New Font Not Showing’ is closed to new replies.