Support » Fixing WordPress » Pagination with query_posts

  • I literally tried everything I could think of, and every solution the WordPress Codex gave to preserve pagination when using query_posts. Nothing worked. (read Example 3 and “preserving the original query”)

    A page would only show the 1st page of results, and clicking “next” or going to page/2 would throw a 404. Is this some kind of bug in 3.0.1 where the documented query preserving doesn’t work?

    Crazy workaround: I used a Page with a custom template where I defined my own $wp-query with a bunch of parameters, and pagination worked beautifully.

    This workaround DOES NOT fix the original problem. Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • you need to have this in your query


    so in example 3 it would be:

    while(have_posts()) { the_post();
    <!-- put your loop here -->

    Is that solution tested?

    I don’t see how adding that &paged=$paged would help. The “$query_string” should already have that value within it so there’s no point to call &paged again…


    Yep i think the solution do work. thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pagination with query_posts’ is closed to new replies.