WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to the world of WordPress. I own a new site and I'd like my home page to display the latest news and articles (which I accomplished to set in Settings > Reading), but I'd like another page to display all posts (not the whole post but a summary) without the need to press "previous page".

e.x. If I have 8 posts and I set maximum posts to be 4 in the settings menu, my home will have 4 posts. But I'd like the other page to have all 8 posts in summary without the need to press previous page to read other posts. How can that be done?

share|improve this question

migrated from stackoverflow.com Jul 15 '13 at 14:37

This question came from our site for professional and enthusiast programmers.

Something along the lines of

    if(have_posts()) {
        while(have_posts()) {
            the_post(); the_excerpt();

And of course, read the documentation for further info:

share|improve this answer

You have to run a custom loop. Create a new template file and in that template file you must run a custom loop like this:

 $args = array(
     'post_type' => 'post'
     'posts_per_page' => -1 //setting -1 will return all posts

 //query for our posts
 $posts = new WP_Query( $args );

 //if we have posts, loop them
 if( $posts->have_posts() ): while( $posts->have_posts() ): $posts->the_post(); ?>
         //your html here
         <h2><?php the_title(); ?></h2>
         <p><?php the_content(); ?></p>


 //even though WP_Query doesn't effect the main loop, reset it as precaution

Unfortunately it isn't easy to do this without creating a custom template file but you can find all the resources you need to piece this together. Best of luck!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.