Wordpress

Display Single Post’s Content in WP

TAGs: 2 Comment

Posted By: eligeske on in Wordpress

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"

"SHARING IS CARING"
  1. Janaka says:

    Thanks….!

  2. eligeske says:

    Your most welcome! :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Learning DHTMLX Suite UI

Learn the foundation of the DHTMLX Suite quickly while building a single page application with multiple components in harmony.

Popular post