Php Wordpress按ID显示帖子

Php Wordpress按ID显示帖子,php,wordpress,Php,Wordpress,我被困在这里,我想通过他们的ID获得一个或多个帖子。我现在得到的是: <?php $post_id = 1; $queried_post = get_post($post_id); $content = $queried_post->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]&gt;', $content); echo

我被困在这里,我想通过他们的ID获得一个或多个帖子。我现在得到的是:

<?php
$post_id = 1;
$queried_post = get_post($post_id);
$content = $queried_post->post_content;
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]&gt;', $content);
echo $content;
?>
虽然这显示了我的文章没有中断和外观,我在我的后端。我认为这是一个很长的代码来获得一个帖子


因此,我的问题是,我如何才能通过ID获得一篇文章,并在最干净的代码中显示我在后端添加的中断。

这就是get_post的全部要点,我不相信还有其他方法