Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Custom Fonts & WordPress

Hi guys,

So I've finally got the hang of how to build custom themes in WordPress thanks to Zac Gordon. Now I have one thing that I just can't seem figure out, and that is how to display custom fonts that haven't come from Google Fonts.

I have linked them correctly in the theme_styles function over in the functions.php file but alas they aren't showing up. Is there additional steps that I need to be doing in the functions.php file?

Thanks

Stu : )

3 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Hi Stu,

You would actually link to the font files from within your CSS document just like you would doing a static site.

Linking from the style.css file uses relative links so url(../fonts/fontname.otf) should work.

Hey Zac!

Don't know why it wasn't working before, but I've managed to get my custom fonts up and running. Probably wasn't link them correctly. Thanks anyway mate.

Stu : )

Zac Gordon
Zac Gordon
Treehouse Guest Teacher

Glad you're up and running now Stu :)

Hey Zac,

While I have you here. I just wanted to say thank you for helping me to finally get my head around WordPress. I have spent the last couple of years self teaching myself and recently after watching all of your WordPress videos my confidence level in theme building has exploded and I no longer see WordPress as that big scary monster coming to ruin the development party!

If you're ever in Adelaide in Australia, I would love to shout you to a couple of beers!

Keep up the great work my friend and thank you again for your passionate teaching method with WordPress!

Stu :)

Zac Gordon
Zac Gordon
Treehouse Guest Teacher

Hey Stu! I'd love that :) It's been fun watching you learn and progress on Treehouse ;) Congrats and keep on rocking bud!