avada主题,wordpress中fontawesome字体不显示Access to font at ~from origin

Access to font at ~from origin has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Failed to load resource: net::ERR_FAILED

解决方法 :
.htaccess 文件尾部增加

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

文章来源参考:https://theme-fusion.com/documentation/avada/how-to/fix-missing-font-awesome-icons-or-custom-fonts/

发表评论

电子邮件地址不会被公开。 必填项已用*标注