Wordpress html'<';和'&燃气轮机';将消失

Wordpress html'<';和'&燃气轮机';将消失,wordpress,Wordpress,我已经在我的ChildTheme functions.php中复制了以下代码,但还没有成功: 1当我以HTML模式编写一些代码时,例如: 现在我想知道这是否是由插件WP代码突出显示引起的。您需要对html实体进行html编码。在php中,可以使用该函数 基本上,

我已经在我的ChildTheme functions.php中复制了以下代码,但还没有成功:

1当我以HTML模式编写一些代码时,例如:


现在我想知道这是否是由插件WP代码突出显示引起的。

您需要对html实体进行html编码。在php中,可以使用该函数

基本上,
是需要用
转义的控制字符。
&
标志也需要替换为
&

remove_action('init', 'kses_init');
remove_action('set_current_user', 'kses_init');
<pre>
<div>why the DIV outside will disappear? </div>
hello() => 'hello world';   //The '>' will disappear as well
</pre>
<div>why the DIV outside will disappear?</div>
<pre>hello() =&gt; 'hello world';   //The '&gt;' will disappear as well
</pre>
hello() =&gt; 'hello world';   //The '&gt;' will disappear as well