• Hi,

    I’m trying to host my own font on WordPress instead of having to constantly pull a font from Google Fonts.

    I found some tutorials on how to do that and followed the instructions, but the font on my website isn’t changing, and according to GT Metrics Google Fonts is still being requested.

    Here is the code I used:

    /* annie-use-your-telescope-regular – latin */
    @font-face {
    font-family: ‘Annie Use Your Telescope’;
    font-style: normal;
    font-weight: 400;
    src: local(‘Annie Use Your Telescope Regular’), local(‘AnnieUseYourTelescope-Regular’),
    url(/wp-content/themes/generatepress/fonts/annie-use-your-telescope-v10-latin-regular.woff2) format(‘woff2’), /* Chrome 26+, Opera 23+, Firefox 39+ */
    url(/wp-content/themes/generatepress/fonts/annie-use-your-telescope-v10-latin-regular.woff) format(‘woff’); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }

    body {font-family:’Annie Use Your Telescope’, Arial, sans-serif;}
    h1,h2,h3,h4,h5,h6,p,a {font-family:’Annie Use Your Telescope’, Arial, sans-serif;}
    (The above font is one I found on Google Fonts that’s very different than a standard font – I wanted to test it out with a crazy one so it would be easy to tell if it worked.)

    I pasted this code at the bottom of my style sheet, but it didn’t seem to do anything.

    Is there anything wrong with my code? Maybe something wrong with the File Path?

    I did check the file path of a local font that my WordPress theme sometimes uses, and it matches up. My font is in the same location as the one my theme successfully uses.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Hosting Font on WordPress’ is closed to new replies.