Forums

Different number of posts on the front page (3 posts)

  1. baia
    Member
    Posted 10 months ago #

    I want 5 posts on my front page but 10 posts on subsequent pages (page 2, 3, ..).

    In my Settings > Reading > Blog pages show at most > I have 10. But I want to show only 5 posts on the front page, so in index.php I use this :

    if ( $paged <= 1 ) $posts = query_posts($query_string.'&posts_per_page=5&paged='.$paged);

    Works fine except that.. In page 2, the 6th to 10th posts don't show. As if, from page 2, WP « thought » that the front page has actually displayed the 10 first posts, not just 5.

    What can I do ?

  2. vtxyzzy
    Member
    Posted 10 months ago #

    Here is a link to some sample code to create a short first page:

    http://wordpress.mcdspot.com/2010/04/01/short-first-page/

  3. baia
    Member
    Posted 10 months ago #

    Awesome, it works and it's just what I needed. Thanks a lot vtxyzzy ! (note that I don't understand anything in this code lol)

Reply

You must log in to post.

About this Topic

Tags