Red*_*dox 7 wordpress parsing function
the_content()
函数以这样的方式解析数据库中的文本,例如段落将获取<p>
它们周围的标记.但是,当您检索循环外部的内容时,您无法使用the_content()
.我正在使用$db_object->post_content
.但是,这样做,文本没有被解析the_content()
,所以通过添加<p>
.只是给出了纯文本.
PHP中是否有函数,或者是否有人知道以相同方式解析文本的等效函数the_content()
并在文本周围输出正确的标记.
Thnx提前.
ste*_*nja 12
是.使用
$content = $db_object->post_content;
$content = apply_filters( 'the_content', $content );
Run Code Online (Sandbox Code Playgroud)