The Query Loop in a WordPress category template can follow the category requested by the visitor. Check that page two continues the same filtered list and that visitors can open it from a regular link.
Match the query to the template's purpose
Suppose a craft blog in Ipoh has a Batik category and a Pottery category. Its shared category template should show the posts from the category the reader opened. In a test copy, select the Query Loop in the Category Archives template.
| Query Type | Use it for | Expected result |
|---|---|---|
| Default | The category's main archive list. | The template determines the current posts. |
| Custom | A deliberately separate selection of posts. | The block's chosen filters determine the list. |
To keep the category context on this archive, use Default. In List View, check that Pagination is inside the same Query Loop as the Post Template, alongside it. Confirm it includes the Next Page control.
Walk the first two archive pages
- Open a category with enough posts to fill more than one page. In this worked example Batik has six posts and the archive displays four per page. Record the four links shown first.
- Follow Next and record the destination. The second page should show the remaining two Batik posts. Check that it has no repeat of the first four.
- Open the resulting URL directly and check that it still returns the same category and post set. Then open Pottery and confirm that its list is drawn from that category. A shared template should continue to respect both category contexts.
If no Next link appears, check whether there are more posts and whether the Pagination block is present. For a public archive meant to be discoverable, inspect the rendered Next link for an href that opens the following page directly.
Repair the first check that fails
If both categories show the same posts, inspect the template's Query Type and any Custom filters. If page two repeats page one, record the URL that the Next link actually opened and check which loop owns it. Retest the same category pair after each change.
Use the pagination guide for general search and link decisions across several pages.
Frequently asked questions
Why can't I select a category in a Default loop?
Default uses the context of the template. Select Custom for a separately curated list whose filters the editor should choose.
Does page two always end in the same URL pattern?
No. Follow the actual Next link and open its destination. Avoid guessing from a URL you saw on another site or loop.
Do I need a Pagination block if all the posts fit on one page?
You do not need navigation to a second page if every result fits on the first. Decide whether the archive is expected to grow, then test again when it has enough posts.

