WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. jcalabro
    Member
    Posted 3 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
    http://pastebin.com/wiPBctmz

    thanks in advance!

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

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

    b:
    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
    Member
    Posted 3 years ago #

    @alchymyth,

    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