WordPress.org

Ready to get started?Download WordPress

Forums

Multiple loops conflicting with pagination (4 posts)

  1. Khalid Al-Aydeross
    Member
    Posted 1 year ago #

    I've spent all day trying to figure this out; looking for different codes and methods to resolve it, and despite the huge amount of results I'd found on the forum, I still can't seem to get this right.

    What I'm trying to do is create a pagination for the following layout:
    1. Posts from category #1
    2. Loop (excluding posts from categories 1 & 2)
    3. Posts from category #2
    4. Continuation of the loop (excluding posts from categories 1 & 2)
    5. Pagination

    So far when navigating through the pages, the results of the loop on the first page are gathered again on the continuation of the loop in the second page. In other words, I'm getting repeated posts -although not duplicates on the same page- that aren't in the descending order I want them to be in.

    I'm not quite experienced in PHP to begin with, so bear with my messy code.

    This is the current code I have in my Index.php:
    http://pastebin.com/JbPF4h9b

    And here's a link to the current address of the uploaded theme:
    http://www.alleviatedmedia.com/lifeartbreak

    Any help at all would be greatly appreciated.

  2. Khalid Al-Aydeross
    Member
    Posted 1 year ago #

    Still having the same issue despite trying to array both queries instead of starting a new one and arraying the other. --Any ideas?

  3. @Raj
    Member
    Posted 1 year ago #

    i m relatively having the same problem
    I have created a blog on which i want to show two category list and i have successed to do haf of that know the problem is that both the loops are interfaring inbetween one other when i use pagination to move the next page plz check here is the link for site for my
    Home page
    I would love to get an anwser.If anyone can...

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    @Raj You ought to create your own thread on the issue.

Topic Closed

This topic has been closed to new replies.

About this Topic