更改WordPress的内容字体 [英] Changing Wordpress content font

查看:145
本文介绍了更改WordPress的内容字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图改变内容的字体系列(the_content()),但是当用< P> 标签来包装它时,就像

I'm trying to change the font family of the content(the_content()) but when I wrap it with a <P> tag like this

<p class="naskh"><?php the_content(); ?></p>

当我在chrome上查看开发者工具时,内容不在< P> 标记,就像这样:

And when I check it on developer tools on chrome the content is not inside the <P> tag, it's like that:

<p class="naskh" lingdex="0"></p>
<p lingdex="1"> the content ...</p>

所以我不能给内容提供我想要的字体类型。我搜查了很多,并尝试了许多给定的解决方案,但他们没有为我工作。
怎么办?

so I can't give the content the font type I want. I searched a lot and tried many given solutions but non of them worked for me. What to do?

推荐答案

不要包装你的 the_content() p 中。相反,你可以这样做

Dont wrap your the_content() in p. Rather you can do like this

<div class="someclass">
    <?php the_content(); ?>
</div>

然后在你的css中你可以有这样的东西

And then in you css you can have something like this

.someclass, .someclass p, .someclass h1 {
    font-family: you_custom_font_family, Arial, Helvetica;
}

这篇关于更改WordPress的内容字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆