Enqueue Font – What am I doing incorrectly?
-
Hi,
I uploaded a single custom font “waldorfshrift” to a Genesis child theme for my site title.
In the style.css file:
.site-title {
font-family: waldorfscrift;
font-size: 36px;
font-weight: 400;
line-height: 1.2;
margin: 0 0 10px;
}In the function.php file:
}
// Add waldorfshrift stylesheet.
add_action( ‘wp_enqueue_scripts’, ‘scratch_equeue_styles’ );
function scratch_equeue_styles() {wp_enqueue_style( ‘waldorfschrift’, ‘//atelier1900.com/wp-content/themes/Scratch/Waldorfschrift/webfonts/31CDD0_0_0.ttf’ );
}The inspector shows that the font is waldorfschrift, but the font is not displaying correctly.
I have decimated my child theme and beginning again because I want to understand this please.
Thanks,
Stephen
The topic ‘Enqueue Font – What am I doing incorrectly?’ is closed to new replies.