我正在尝试更改内容 (the_content()) 的字体系列,但是当我用 <P>
包裹它时像这样标记
<p class="naskh"><?php the_content(); ?></p>
当我在 chrome 的开发人员工具上检查它时,内容不在 <P>
中标签,就像这样:
<p class="naskh" lingdex="0"></p>
<p lingdex="1"> the content ...</p>
所以我不能给内容我想要的字体类型。我进行了很多搜索并尝试了许多给定的解决方案,但没有一个对我有用。 怎么办?
最佳答案
不要将您的 the_content()
包装在 p
中。相反,你可以这样做
<div class="someclass">
<?php the_content(); ?>
</div>
然后在你的css中你可以有这样的东西
.someclass, .someclass p, .someclass h1 {
font-family: you_custom_font_family, Arial, Helvetica;
}
关于html - 更改 Wordpress 内容字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19358711/