Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7504597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:37:41+00:00 2026-05-29T21:37:41+00:00

Did a static version of site using FontSquirrel-generated CSS code. CSS stylesheet in css

  • 0

Did a static version of site using FontSquirrel-generated CSS code. CSS stylesheet in “css” folder, fonts in “fonts” folder. CSS sample chunk showing @font-face relative paths:

@font-face {
    font-family: 'TitilliumText22LRegular';
    src: url('../fonts/TitilliumText22L003-webfont.eot');
    src: url('../fonts/TitilliumText22L003-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/TitilliumText22L003-webfont.woff') format('woff'),
         url('../fonts/TitilliumText22L003-webfont.ttf') format('truetype'),
         url('../fonts/TitilliumText22L003-webfont.svg#TitilliumText22LRegular') format('svg');
    font-weight: normal;
    font-style: normal;
}

Everything works fine with a call to

font-family: 'TitilliumText22LRegular', Verdana, sans-serif;

Now it’s WordPress template time. WP uses a template root stylesheet (“style.css”). So logically, if I store the fonts in a “fonts” folder and just get rid of the “../” path backup, I should be OK, since the WP stylesheet is at root, and everything in it should be referenced to its own location:

    src: url('fonts/TitilliumText22L003-webfont.eot');

But this does not work. Fallback font-families and other font style rules work fine. The WP stylesheet has no problems with the analogous CSS path structure referencing images in an “img” folder below the template root. Strangely, if I move the font files themselves up to the template root and reference them in the stylesheet directly like so:

    src: url('TitilliumText22L003-webfont.eot');

everything works fine. Naturally though I don’t want to dump 40+ font files in the template root. Possibly WP requires some separate PHP file/rule using URL path trickery for this, say blog_info(‘template_url’) or similar. But I hope I’m missing something obvious instead!

thanks for any ideas

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:37:46+00:00Added an answer on May 29, 2026 at 9:37 pm

    Add separate font-face folder containing the fonts and the font-face css (named fonts.css for my example) at the theme directory (same level as style.css)

    Ditch all prefixes to the font names too (no ../ or /).

    In your header.php file you want to add:

    <link rel="stylesheet" type="text/css" href="<?php echo bloginfo( 'stylesheet_directory' ); ?>/font-face/fonts.css" />
    

    Works for my theme at any rate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Did you ever had a bug in your code, you could not resolve? I
I've tried to run a Wicket app in an embedded Jetty, using this code:
I'm using a fairly old version of PetaPoco from https://github.com/schotime/PetaPoco - it's basically vanilla
I'm attempting to perform a link of previously generated .obj files (using the latest
The Google Code site of Morphia says it works great with Guice, Spring, and
I tried out writing a pipelined version of Bitonic Sort using with File Read,
I did the notepad tutorials and my SQL server is a modified version of
The short version is that this doesn't appear to be a code problem (though
Currently, I have a static factory method like this: public static Book Create(BookCode code)
I'm using Code First. Everything works just fine (inserts, updates, selects) everything is tested.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.