我在这里看到我可以使用帖子 ID 在 WordPress 中获取帖子的内容。就像是:
<?php $my_postid = 83;//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;?>
Run Code Online (Sandbox Code Playgroud)
我想要同样的东西,但是通过它的名字来获取帖子。