• Resolved liuyiwp

    (@liuyiwp)


    Hello, everyone,

    Sorry to start a new thread here. I encountered this weird problem that any page above 10 is not found. I disabled the WP-Pagenavi, no help. I tried default theme, no help. I tried to remove “-189,-190” in my page query code “cat=-189,-190” no help. Can someone please give me a hand? Thank you!

    My WP blog address is https://chinablog.cc

    Here is my page query code

    <?php
          $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
          query_posts("cat=-189,-190&paged=$page&posts_per_page=5"); ?>

    Best,
    Jensen Liu

Viewing 3 replies - 1 through 3 (of 3 total)
  • code looks ok
    try regenerating your permalinks
    admin – settings – permalinks

    Thread Starter liuyiwp

    (@liuyiwp)

    Thanks for your reply. I tried “save changes” to update my permalinks structure. The problem still exists. It’s interesting that page 1-10 works just fine. But not 11 or above…

    Thread Starter liuyiwp

    (@liuyiwp)

    Just find the reason:

    the error lies in the “posts_per_page=5” parameter. My blog “reading “settings was setting at “6” post per page. Once I change to 5, the problem is gone.

    Now I am wondering how was this query code preserved through entire blog. It seems to me that the code only show up at index page, not in the archvie.php, which is actually generating the “page”s. Is that “$page” a global variant?

    I am pretty new to php, sorry to be no naive…

    Update:
    I just changed blog “reading” “show at most” pages back to 6, no problem happens. Well, maybe it’s because of my WP-supercache plugin … or maybe it’s just magic. Whatever, everything works fine now.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘/page/11/ or above not found, 404 error’ is closed to new replies.