Display Single Post’s Content in WP

Here is the Wordpress methods to query just a single Post into one of your pages.

Here it is:

<?php query_posts('p=11');  /* assign page id */ ?>
<?php if(have_posts) : the_post(); /* start the loop */ ?>
<?php the_content(); /* prints the content */ ?>
<?php endif; /* end the loop */  ?>

REMEMBER THIS IS FOR POSTs and NOT PAGEs


 

2 Responses to “Display Single Post’s Content in WP”

  1. Janaka says:

    Thanks….!

  2. eligeske says:

    Your most welcome! :)

Leave a Reply