MyFonts webfont won't load
-
I’m using Bones as a starter theme, and I’m having issues implementing a MyFonts webfont to my site.
The MyFonts webfont kit came came with a folder with a “starthere.html” instruction file and a css stylesheet titled “True_To_Life.css”. The instruction file said to add the stylesheet to the header.php file of the theme.
I tried to add the stylesheet in the header.php file, but that did not work. The font loaded for one second, then went back to the sans-serif fallback.
Then I tried enqueueing the file like this:
put True_To_Life.css file in the css folder of my themeregistered the style in bones.php like this:
//register MyFonts stylesheet wp_register_style( 'bones-true-to-life', get_stylesheet_directory_uri() . '/library/css/True_To_Life.css', array(), '', 'all' );
enqueued the stylesheet like this:
wp_enqueue_style( 'bones-true-to-life' );
I’m using a SASS variable to call the font like this:
$andes-book: 'AndesBook', $sans-serif;
Only the sans-serif fonts load.
Here’s the link to the test site: The font doesn’t render locally or on the staging server. I bet it’s something simple, but I can’t figure out what it is.
- The topic ‘MyFonts webfont won't load’ is closed to new replies.