• hello,

    i’m creating a website for my university festival.

    we are using custom font. everything works well with the css i’m adjusting on the main page and gets abandoned or unread by any other page. I’ve tried duplicating the mainpage with plugins, but it still doesn’t work. i’m not quite sure how to get over this.

    i’d be very thankful for any piece of advice

    website reading css:
    https://2018.motyf-festival.com/

    website not reading css:
    https://2018.motyf-festival.com/symposium/

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Looks like the problem is in the relative URLs you’re using to fetch the custom fonts. WordPress gets the right URL on the home page, but it gets the wrong URL on other pages because the URLs where the fonts are located is relative to the actual URL of the page.

    Long story short, this should work:

    @font-face {
        font-family: 'center';
        src: url('fonts/center-demi.eot');
        src: url('fonts/center-demi.eot?#iefix') format('embedded-opentype'),
             url('fonts/center-demi.woff2') format('woff2'),
             url('fonts/center-demi.woff') format('woff'),
             url('fonts/center-demi.ttf') format('truetype'),
             url('fonts/center-demi.svg#centerdemi') format('svg');
        font-weight: bold;
        font-style: bold;
    
    }
    Thread Starter polczynski

    (@polczynski)

    @stephencottontail

    Thank you for your quick replay,
    unfortunately this doesnt seem to work, it only made the fonts not work on the main page as well. would changing the location of the fonts help then?

    thank you

    Hmm, did you have that font code in Dashboard > Additional CSS and I just missed it earlier? In that case, your best bet would be to use an absolute URL instead of a relative URL:

    https://2018.motyf-festival.com/path/to/font/file

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘css not loading on different pages’ is closed to new replies.