如何修复前端 wordpress 中不显示的图标

How to fix icons not showing in frontend wordpress

在前端,一些图标不起作用:fontawsome 图标和管理栏中的图标,但仅在前端。在后端,我可以看到所有的图标。

在自定义 css 中我发现了这个 :

@import url('https://fonts.googleapis.com/css?family=Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i');

body { color:#4c5166;
font-weight:400;
} 


* { font-family: 'Montserrat', sans-serif !important;
}

还有:

.flex-direction-nav a {
font-family:icomoon !important;
}
.flex-direction-nav a {
font-family:icomoon !important;
}

你好,我以前遇到过这个问题。我通过从

这样的样式中删除“*”来解决
*{ 
  font-family: 'Montserrat', sans-serif !important;
}

改为这样做

body,html {
   font-family: 'Montserrat', sans-serif !important;
}

注意:如果您采用第一种方式,那么您实际上是在标签中说出所有内容,类 并且 id 应该采用不适用于 fontAwesome 图标或任何其他图标的 Montserrat 字体