Adding Webfont to Theme
-
Hello, first of all, I am a wordpress/php/css/html complete newbie. I will also be using googledoc links to share content. I would appreciate it if anyone could help me through this. I have been trying for several hours with no luck. I purchased a font from myfonts.com and need to upload the font into my theme.
– My Website: thrivephoto.co
– I am using wordpress with Armada by Dream-Theme
https://themeforest.net/item/armada-multifunction-photography-wordpress-theme/9314649– MyFonts.com (“MulberryScript” is the font I purchased) provided a webkit with .eot, .ttf, .woff, .woff2. They also included a “Starthere.html” file with instructions.
– You can also view the CSS file they provided me.
– This is My Current style.css:
– This is what I curently have to link css under <head> in header-single.php file:
<head>
<link rel=”stylesheet” type=”text/css” href=”thrivephoto.co/wp-content/themes/dt-armada-child/fonts/MyFontsWebfontsKitCustom.css”>**I am using a child theme.
** Location of Fonts and css file: ‘thrivephoto.co/wp-content/themes/dt-armada-child/fonts’
**My theme has 3 files titled with “head” (header.php, header-single.php, header-main.php). The “headersingle.php” seems to be the one being utilized with <head> code in it, not the others. This confuses me as to which I should place my link to css in.
**You can see for yourself if you download this font, Windows 7 will say “The requested file …302544_1_0_1.ttf is not a valid font file.”It seems like there are 5 steps:
1.) Upload font files & css file to C-Panel
2.) Reference the css file in the <head>
3.) use @import in style.css
4.) use @fontface in style.css
5.) apply font settings in style.cssNotes: I hid Font “BuildID” with “……….” on the myfont google doc. No sure if that was sensative information or not, so I hid it.
My Main Goal is to get this font in my font settings (drop down bar) for my theme but if we can just get it to work for css that would be great.
THANK YOU!
Bob
- The topic ‘Adding Webfont to Theme’ is closed to new replies.