The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

No posts displayed on Page 2 after limiting posts (3 posts)

  1. jcalabro
    Posted 5 years ago #

    I have 2 query's on my index and paginate the 2nd query. I am able to limit the posts but when I go to the second page (/page/2/) no posts are available. I've tried various forms of the query and nothing seems to work.
    My permalinks are fine -- that is not the issue.

    If anyone can take a look and see if they know what's wrong, i'd truly appreciate it! I can't seem to figure this one out...

    my index on pastebin

    thanks in advance!

  2. Michael
    Forum Moderator
    Posted 5 years ago #

    try to add wp_reset_query() at the end of the first loop;

    pagination does not work together with 'offset';
    try to use a different method to exclude the first post of the second query; some are described here: http://codex.wordpress.org/The_Loop#Multiple_Loops_in_Action

    also, if the two loops are only to show the first post different, try to use a counter variable and a conditional statement; you should be able to find a few treads about 'styling the last/first/latest post different'

  3. jcalabro
    Posted 5 years ago #


    B worked like a charm.
    I had no idea that offset and pagination were an issue.

    Thanks a million!

Topic Closed

This topic has been closed to new replies.

About this Topic