Skip to content

Issue with pagination throught multiQuery #22

@m4gz

Description

@m4gz

I have archive page with pagination - http://stackoverflow.com/questions/39105885/multisite-pagination-issue-by-multi-query-archive-404
Paginate by that custom function http://sgwordpress.com/teaches/how-to-add-wordpress-pagination-without-a-plugin/

And the issue is - for example i have 3 posts on the mainsite, and 1+1+1 on the subsites and 1 post per page. $query->max_num_pages return correct number of all posts (3+1+1+1 = 6) and im getting correct pagination with 6 pages, but surfing after 3rd page (number of posts at the mainsite) im getting 404. I think it happends because WP 'thinking' that i have only 3 paginations, because he stored 3 posts and 1 per page (mainsite) and i need to change his 'posts'/'posts_per_page' to 'multi_posts'/'posts_per_page'.

I can not figure out how to solve it, can somebody help me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions