Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Webfonts only load on home page.

Discussion in 'Misc WordPress Requests' started by JamesPuckett, Oct 11, 2017.

  1. JamesPuckett

    Guest

    Webfonts only load on home page., by JamesPuckett

    I’m having trouble with web fonts not loading. They work fine on my home page but don’t load elsewhere. The fonts are locally hosted on the web server. In Chrome the console is showing a 404 error for my web fonts. WordPress is pointing to directories named for each of the site rather than pointing to the top-level web fonts directory.

    I’m adding CSS for the fonts using Appearance > Customize > Additional CSS. I’ve tried several themes and this problem occurs with all of them. I also tried using the Simple Custom CSS plugin and that doesn’t work, either. I tried using a clean install of WordPress with no plugins and that failed, too.

    An example of my CSS for the webfonts is:

    @font-face {
    font-family: AntarcticanMono;
    src: url(web-fonts/AntarcticanMono-Bold.woff2);
    font-weight: bold;
    }
    h1 {
    font-family: 'AntarcticanMono';
    font-weight: bold;
    }

    Sorry for not having a link, but I’m developing this internally.

    Webfonts only load on home page.
     
    #1

Share This Page

Web Hosting