WAIT: Filtered Query Loop Breaks Infinite Scroll in Bricks Builder

Hey all, I’ve run into a frustrating issue and I’m hoping someone has either a workaround or an insight into what I’m missing.

I’m using a custom query in a Bricks Query Loop to pull a specific set of media attachments from an ACF Gallery field. Everything works great with infinite scroll until I apply a filter.

Here’s what I’ve got going on:
• I’m querying images using post__in to limit to those in the ACF field.
• I’m randomizing the results with shuffle() before passing them into the query.
• I’m displaying the results with Bricks’ native filter UI, which is set to “button” style and tied to a custom taxonomy on attachments.
• I’m using Bricks’ built-in Infinite Scroll setting.

Here’s the issue:
1. Without a filter applied, infinite scroll loads additional images as expected.
2. As soon as I apply a filter (which works correctly and shows the right subset), infinite scroll stops working entirely. It might sometimes load a few more results, but it stops well short of all of them.
3. However, if I reload the page directly into the filter (e.g. by clicking a pre-filtered URL), infinite scroll works again within the filtered subset.

So it seems like after filtering, Bricks fails to recognize that more results exist and never triggers the next page load. I tried manually dispatching a scroll event after filtering with no luck.

Is this a bug, or am I missing a step to reinitialize the infinite scroll observer after filtering?

Thanks in advance.

Hi @plymouthvan and welcome to the forum! :partying_face:

I tried to replicate this with simple custom PHP, but I couldn’t. Can you try to replicate this with as little code as possible - with the most default setup as you can, and then you can paste it here, so I can try to replicate it.
Also, once you do that, can you record a video showing the issue as well, so that I will understand your setup.

Thank you,
Matej