Change posts_per_page after first page in custom loop (4 posts)

  1. Twansparant
    Posted 5 years ago #

    Hi everyone,

    I made a custom $wp_query in order to display my first post only on the first page differently then the rest. Because this first post is wider then the others, I want my grid to be different than on the other pages. So therefore I want my posts_per_page variable to be let's say 3 on page 1 (1 big post and 2 small posts) and 4 on the rest of the pages (4 small posts).

    Everything is working, except post 5 dissapears somehow and that confuses my wp_paginate resulting in an empty page 3.

    This is my code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Does anyone have an idea to solve this?
    Any help is very much appreciated!


  2. Twansparant
    Posted 5 years ago #

    Oeps, sorry!
    Here's my code in pastebin: http://pastebin.com/cam0uzVU

  3. Twansparant
    Posted 4 years ago #


  4. esmi
    Forum Moderator
    Posted 4 years ago #

    Hint: Try posting a new topic. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic