WP Child Theme and @font face

  • Started
  • Last post
  • 2 Responses
  • Xopher0

    I always keep the @font-face stuff within my child theme style sheet, rather than a separate file.

    Then say if my fonts were in a folder called 'fonts', all I have to do in the style sheet is link to 'fonts/'.

    Hope that helps.

    • The fonts folder would be in the child theme root.Xopher
  • hereswhatidid0

    Make sure to verify the paths to the font files are correct when calling it from the child theme (ie. Not pointing to the child directory vs parent). A couple of the WP theme functions behave differently when accessed from a child theme.

    • I'm using all absolute paths. So confused.mg33
  • mg33

    Has anyone ever run into an issue with a WP child theme when trying to use @font-face for custom web fonts?

    I'm working on one for the first time, and set up everything exactly as I did on my three other sites that just use the parent theme:

    1. font files, and font stylesheet CSS in a folder at url.com/fonts
    2. header.php properly references the @font-face stylesheet with an absolute url.
    3. Literally copied the CSS from my other site that specifies font for certain elements.

    In Firebug I can see the font-family declaration for the font, but it's grayed out and does not appear.

    Just wondering if anyone has run into web font issues with a child theme. Thanks!