cancel
Showing results for 
Search instead for 
Did you mean: 

Custom fonts not loading in Wordpress

I am launching a new Wordpress website that uses some fonts and they are not loading.

 

The URL of the new site is here: http://totalpresence.org/2019/

 

In the Console, I see an error: 

Access to font at 'http://totalpresence.mmdemosite.com/wp-content/uploads/avia_fonts/type_fonts/roboto-slab/robotoslab-...' from origin 'http://totalpresence.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

 

I've tried adding a line to functions.php 

header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Methods: GET, OPTIONS");

 

Also added a line to htaccess in the root and in the /2019 folder but the same errors continue to show.

Access-Control-Allow-Origin "http://totalpresence.org"

 

How can this be fixed?

 

Thank you.

 

1 REPLY 1
Highlighted
Super User III
Super User III

Re: Custom fonts not loading in Wordpress

@TotalPresence 

 

When I attempt to load your site I get a 500 error. You may want to turn on WP Debugging to get a clearer picture of what's happening.



Best Regards,

Joe


Check out my site! | My Garage Articles | Portfolio/Resume

* Please note that I offer free advice on this forum. I DO NOT PROVIDE ANSWERS VIA PM. If you would like personalized help, you can see my pricing on my services page. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *


Get Better Support on the Community Boards!


Etiquette When Asking for Help from the Community