how to install custom font
-
I have webkits of a particular font that I want to use in my WordPress site. I have put the kits, their css, and other related files in a folder called “css” in my child theme folder. I have put `function load_fontstyle() {
wp_register_style(‘stylesheet’, get_stylesheet_directory_uri() . ‘/css/stylesheet.css’);
wp_enqueue_style( ‘stylesheet’);}
in my functions.php. In my header I put
<script src=”https://use.typekit.net/svg7htz.js”></script>
<script>try{Typekit.load({ async: true });}catch(e){}</script>because the instructions I found online told me to. I've also tried
@import url(“mytheme/css/stylesheet.css”);` and
@import url("../mytheme/css/stylesheet.css");
in my child theme css but no matter what I try my custom font won’t appear. I’m working in localhost so I don’t have a url to share. Can anyone help me, please?
- The topic ‘how to install custom font’ is closed to new replies.