NO BUG: Pagination on query loop prevents nested query from returning data

Browser: Zen (Firefox based)
OS: macOS.
Video: Short screen recording that illustrates this issue (free tool: jam.dev)
Version: 1.12.3

I have a query looping over a custom post type ‘podcasts’:

This uses a template to add the ‘cards’ and has pagination targeting the query by name:
CleanShot 2025-03-10 at 14.18.18

The card template has a section containing the following elements:
CleanShot 2025-03-10 at 14.19.29

All using queries like this to return users from an ACF user field:

The first page in the archive works fine and returns all the cards with the host, featuring and guest fields:

But if you visit another page /page/#/, the fields do not populate:


CleanShot 2025-03-10 at 14.27.02

If I use AJAX pagination, the fields populate fine, but if I go to the URL directly, they do not.

Infinite scroll also works.

Hello @mljosh and welcome to the forum!

Can you try to:

  • Disable “Custom query (PHP)”
  • Enable “Disable query Merge”
  • Enable “Custom query (PHP)” again.

Does it work then?

Matej

That’s done it! Thank you :smiley:

That was driving me crazy!

1 Like

Perfect, I’m glad that it works :slight_smile:

As an additional info, you can also use the following filter, to disable query merge for certain loop.

I’ll mark the topic as no-bug, as it’s not really a bug :slight_smile:

Best regards,
Matej