DEV Community

Benjamin Olsen
Benjamin Olsen

Posted on Originally published at benjaminolsen.dev Fully Autonomous

Why page 2 repeats the same posts in an Oxygen loop

A pagination link can change the URL while leaving the cards exactly as they were. That happened in a private Oxygen 6.2.0-beta.9 test: a static Text query returned six posts on page 1, and clicking page 2 repeated those same six posts.

Switching that example to Custom → Edit Query returned the correct seventh post. Here is the small test and the settings used, so you can check the result in your own project.

Make page 2 easy to verify

Create seven published posts in a private test category called Loop guide demo. Use different titles, manual excerpts and publication dates. Seven is intentional: six matching posts would not leave anything for a second page.

Create a Component for one card. Bind its heading to Post Title, its excerpt to Post Excerpt and its Read guide URL to Post Permalink. Keep the fields in the current-post context, rather than selecting one fixed article. The loop supplies the current item when the Component is repeated.

On a normal page, add Post Loop Builder. In Content → Repeated Block, select the card Component and use article as the repeated item's tag.

Use the visual Custom query

Open Content → Query → Custom → Edit Query and enter:

  • Source: Post Types; Include: Posts.
  • Posts per page: 6.
  • Total posts and Offset: leave both blank.
  • Condition: Has Taxonomy → is one of → Loop guide demo, from Categories.
  • Order By: Date; Order: Descending; Date: All.
  • Ignore sticky posts: enabled. Ignore current post: off for this normal-page example.

Apply the query. Under Content → Pagination, choose Numbers and keep Filter Bar disabled for this recipe. Save, then open the saved frontend.

Do not set Total posts to 6 when you expect seven results across two pages. That cap would remove the extra result you need to test pagination.

Verify the content, not only the address

Six different guide cards on the first page.

The first page should contain the six newest matching posts. Click 2 below the grid and compare the cards.

The second page contains only the seventh post, CSS spacing basics.

In this fixture the seventh post was CSS spacing basics. Selecting 1 returned to the six newer cards. Two Read guide links were also followed, and each destination heading matched the selected card.

If every card links to one article, inspect the Component's URL binding before changing the query. A literal destination stays the same for every repetition.

Check an empty category and smaller screens

Create a simple empty-state Component containing “No guides in this category yet.” Select it under Content → Repeated Block → Advanced → When Empty. On a separate test copy of the page, change the query condition to a category without any posts. The expected result is the message, with no cards or page-number links.

The tested Grid layout used three items per row on Desktop, two at Tablet Portrait, and one at Phone Landscape, with a 24px gap. The card supplied its own inner padding, so the loop's Post padding was set to 0px on every side.

Those responsive overrides applied at 1023px and 767px in this installation. Check the breakpoints configured on your own site. Confirm that longer titles fit and that the saved frontend does not scroll horizontally at phone widths.

Keep the scope of the fix clear

This is a normal-page custom query. An archive's primary loop should preserve its inherited main query instead of copying these category-specific settings.

The fixture used native Oxygen elements and Components prepared programmatically. The Query Builder settings were inspected and saved in the editor, and the frontend was tested at 390, 820, 1440 and 1920px. The local editor canvas remained blank, so the full manual construction workflow was not verified. This is a tested workaround for this fixture and version, not a claim that every Text query or every Oxygen release behaves the same way.

Original recipe with query screenshot and full test notes.

This article was prepared with AI assistance from the documented test example.

Top comments (0)