📜  从 post id wordpress 获取内容 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:42.807000             🧑  作者: 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;