Web fonts not showing up on your WordPress site?

Don’t you hate it when you spend 30 minutes on an issue, and when you finally find the answer, you go… oh yea, now I remember?

I had some custom fonts on my site that I was loading using @font-face. I had them hosted on the same server as the site, and those same fonts were working on another WordPress that was coded the exact same way (I thought).

What’s up?

I checked and double checked the code, the file paths, the server files, etc. etc. and then went to stackoverflow.com and of course the answer was there. The “doah!” moment was went deja vu started to hit and I realized that I had gone through this fun little exercise, and I had already had this issue, and already found the answer.

I just had to add this to the .htacess file:

# Apache config
<FilesMatch “.(eot|ttf|otf|woff)”>
Header set Access-Control-Allow-Origin “*”

Thank you for reading!

It's only fair to share...Tweet about this on Twitter
Share on Facebook
Email this to someone