Retrieve a Particular Post or Page

Retrieve a Particular Post
<?php
// retrieve one post with an ID of 5
query_posts(‘p=5’);     
?>
If you want to use the Read More functionality with this query, you will need to set the global $more variable to 0.

<?php
// retrieve one post with an ID of 5
query_posts(‘p=5’);
     
global $more;
// set $more to 0 in order to only get the first part of the post
$more = 0;

// the Loop
while (have_posts()) : the_post();
  // the content of the post
  the_content(‘Read the full post »’);
endwhile;
?>
Retrieve a Particular Page
To retrieve a particular page, you could use the following:

<?php
query_posts(‘page_id=7’);      //retrieves page 7 only
?>

or

<?php
query_posts(‘pagename=about’); //retrieves the about page only
?>