Ila*_*sda 1 wordpress wordpress-theming
如何使用<p></p>包装器显示给定页面ID的内容?
我目前使用的方法是:
<?php
$id=21;
$post = get_page($id);
$content = apply_filters('the_content', $post->post_content);
echo $content;
?>
Run Code Online (Sandbox Code Playgroud)
例如,page ID = 21有以下内容:Some content
wordpress echo是什么 <p>Some content</p>
任何建议都非常感谢.