Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Topic loop Filter by Tag & Search Term + Pagination = Mess

  • Avatar of Menelik
    Menelik
    Member

    @menelikseth

    I can’t get forum topic loop pagination to play nicely with filters.

    Problem:

    1. If the topic loop returns a list of topics that fills one page OR I’m on the FIRST page of a list of topics that spans multiple pages, the filters work as expected. They’ll return all of the topics that meet the filter criteria (even if they aren’t on the first page, which is fine).

    2. If the topic loop returns a list that spans multiple pages, and I’m on any other page BUT the first page of the topic list, then the filters will return the “no post exists” message. It’ll completely ignore the posts on that page, which fit the criteria.

    3. The FILTERED topic loop work as long as it’s not paginated (I can click one filter, then click another and reload the page with only the posts that fit the new criteria etc). If the filtered topic loop is paginated, it works so long as I don’t venture past the first page. If I click past the first page, everything goes haywire (pagination numbers randomly increase/decrease, filter stops working).

    Here’s my code. I’m 100% there’s something wrong with it, I’m pretty sure BuddyPress should be able to handled paginating filtered posts.

    `<?php if ($_POST=='CGAnouncements'||$_POST=='CGJobs'||$_POST=='CGServices'||$_POST=='CGTools') :?>

    `

    the rest is standard loop stuff. If you can’t spot anything wrong with the posted code, I’ll just post the whole thing here. (didn’t want to post a huge chunk of code for nothing)

    I’d really appreciate some help on this, I’m glad I decided to mess around with pagination before uploading this to the client. For now I’ll just figure out how to have all the posts listed on one page, and release the paginated version as an update or something…

    If I figure anything out, as always, I’ll post it here.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.