📜  wp 通过 id 获取帖子内容 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:41.785000             🧑  作者: Mango

代码示例2
$my_postid = 12;//This is page id or post id
$content_post = get_post($my_postid);
$content = $content_post->post_content;
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;