WordPress Home Page with One Post

Some of my posts are quite long so I decided I wanted to change my home page to display only one post rather than many. This made my home page look a bit neater and not so long.

In order to do this I simply logged in to my WordPress control centre and from the left hand side selected Appearance >> Editior.

From here view the left side and choose the index.php file.

At the very top of that file change the code from:
<?php get_header(); ?>

to:
<?php get_header(); query_posts($query_string.’&posts_per_page=1′); ?>

VOILA! One post per page.

Good Luck.

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>