当我转移了avada主题时,我有一些与locahost设置有关的错误,因为我在本地构建网站然后转移。
Access to Font at 'http://localhost:8081/crescent/wp-content/themes/Avada/includes/lib/assets/fonts/icomoon/icomoon.woff' from origin 'http://crescent.solitudesoftware.co.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://crescent.solitudesoftware.co.uk' is therefore not allowed access.
(index):1 Access to Font at 'http://localhost:8081/crescent/wp-content/themes/Avada/includes/lib/assets/fonts/icomoon/icomoon.ttf' from origin 'http://crescent.solitudesoftware.co.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://crescent.solitudesoftware.co.uk' is therefore not allowed access.
(index):1 Access to Font at 'http://localhost:8081/crescent/wp-content/themes/Avada/includes/lib/assets/fonts/fontawesome/fontawesome-webfont.woff2?v=4.7.0' from origin 'http://crescent.solitudesoftware.co.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://crescent.solitudesoftware.co.uk' is therefore not allowed access.
(index):1 Access to Font at 'http://localhost:8081/crescent/wp-content/themes/Avada/includes/lib/assets/fonts/fontawesome/fontawesome-webfont.woff?v=4.7.0' from origin 'http://crescent.solitudesoftware.co.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://crescent.solitudesoftware.co.uk' is therefore not allowed access.
(index):1 Access to Font at 'http://localhost:8081/crescent/wp-content/themes/Avada/includes/lib/assets/fonts/fontawesome/fontawesome-webfont.ttf?v=4.7.0' from origin 'http://crescent.solitudesoftware.co.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://crescent.solitudesoftware.co.uk' is therefore not allowed access.
(index):1 Access to Font at 'http://localhost:8081/crescent/wp-content/plugins/fusion-builder/inc/lib/assets/fonts/fontawesome/fontawesome-webfont.woff2?v=4.7.0' from origin 'http://crescent.solitudesoftware.co.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://crescent.solitudesoftware.co.uk' is therefore not allowed access.
但是我无法找到这些存储的位置以将设置更改为新的网址我已经尝试过替换插件但是它没有选择这些项目。
答案 0 :(得分:5)
答案 1 :(得分:1)
根据这篇文章:https://theme-fusion.com/knowledgebase/are-your-font-awesome-icons-or-custom-fonts-not-showing-up/
您可以添加到您的HTACCESS:
# Apache config
<FilesMatch ".(eot|ttf|otf|woff)">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
我对迁移的网站存在同样的问题,但无法确定旧网址持久存在的数据库中的位置。 HTACCESS修复程序不像实际解决坏记录那样令人满意;但是,它有效!
答案 2 :(得分:0)
我最近将一个客户站点切换到了使用Avada主题的新域,并且所有icomoon字体都消失了。我尝试编辑.htaccess,因为有些线程建议...没有骰子!重置融合缓存非常有魅力。