How to show only your single latest post on your WordPress home page.

Wordpress Settings > Reading - setting the number of posts per pageIn WordPress 2.x under Settings > Reading, you can set a number for “Blog pages show at most”.  This applies globally, however.  I discovered a method to make your home page to show only the latest post, while allowing all other blog pages to respect the “at most” number.

In index.php, just before the loop, I added the following line:

<?php query_posts('showposts=1'); ?>

Basically, that sets up a preemptive query and grabs only the latest post, rather than allowing the loop to query the latest “at most” number of posts.

Related Posts Plugin for WordPress, Blogger...