Support » Fixing WordPress » Archive page not showing older (page 2 ) posts

  • Resolved fredhead



    I’ve copied an archive.php template, customized it to use query_posts to define the loop, created a new page and assigned it to my new template, and the new page displays fine the first set of 20 listings. However, when I click the next/prev links, I see only the same first page of content. I searched the forum and couldn’t find anything on this.

    Any ideas how I can debug this? Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Can anyone help me figure this out? Thank you!


    I really need help with this issue, if people know how archive pages and pagination in archive pages work. I’ve searched thoroughly through all the WP documentation and struck out. Surely this is a common problem for people setting up archive pages outside of the default archive.php structure?

    I’d appreciate help, if anyone can point me to resources. Thank you!

    In case someone finds this through search, here’s the problem. The WordPress documentation says two different things with respect to category archive pages:

    1. Here it says you can use query_posts to restrict a category page to a specific category:

    2. Here it says use of query_posts will cause WordPress to ignore the page value, which condemns you to just a first page of listings:

    The documentation clearly needs to update at least the Category Template page to note that use of query_posts will cause WordPress to ignore the page value, thus preventing pagination links from working within a category page.

    I’m also amazed there don’t appear to be any documentation pages about pagination, how it works, when it works. That would have saved me a few hours wasted time.

    In my case, I’m creating section home pages around specific categories. Since I can’t use the category archive pages, I’ll have to hack it by customizing versions of single.php, creating a blank (wasted) page for each section, assigning the new template to the page, and then in the new template manually including a link to the full category archive. Basically a ton of wasted time and needless complexity because WordPress doesn’t read the page value when you use query_post.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Archive page not showing older (page 2 ) posts’ is closed to new replies.