cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
Highlighted

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
Super User III
Super User III
Solution

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.



I am a GoDaddy End User - Just Like You
Check out my site! | I drink and I know things. Especially about websites and web hosting.
* Please note that I offer free advice on this forum. If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community