Archived topic
Menu arrows and horizontal lines
3 replies · Started by Paul on July 26, 2018
I recently installed generatepress and the premium add on. Currently where the menu arrow should be there is a box the F107 in it and the search icon is a f002. It is showing correctly in the customize windows but when publish it is just the letters and numbers and not the icon.
The logo is not showing in the mobile app as well.
Any help would be great.
Paul
Hi there,
This should be the same issue here:
https://generatepress.com/forums/topic/icons-not-loading-2/#post-629250
Let us know if this helps.
Thank you for your quick response. When I tried to paste in the code on the link but got server error. I found another snip-it on line that is very similar to part of the one on the link.
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
It seems to be the following code that is causing an internal server error:
# nginx config
if ($filename ~* ^.*?\.(eot)|(ttf)|(woff)$){
add_header Access-Control-Allow-Origin *;
}
On the desktop I am getting this error in the console.
Access to Font at
'http://domain.com/wp-content/themes/generatepress/fonts/generatepress.woff2'
from origin 'http://www.domain.com' has been blocked by CORS policy:
No 'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'http://www.domain.com' is therefore not allowed access.
I substituted my domain in the above.
I still can't seem to get it to work in my chrome on my android device.
Thank you,
Paul
The root of the issue is the URL you're typing into your address bar is different than the URL calling the files.
For example, if you type http://*www*.yourdomain.com into your address bar, but your site is calling resources from http://yourdomain.com, this will happen.
This is also true for using https:// and http://.
The best thing you can do is:
1. Make sure there's a redirect from www to non-www (or the other way around). Not doing this will cause a lot of issues, like problems with your search engine ranking.
2. Enforce https across the entire site, so it's not possible for people to use http.
Your hosting company should be able to help you with both of the above :)