WIP: Load More Button, ajax query pagination does not work in popup

So I have a list of product cards generated by a query. Each card when clicked, loads a product popup template that displays corresponding information about this product. (the product post type was registered with ACF. So no woocommerce here).
Now each product has an ACF gallery field which I have displayed with a query loop. I used this snippet to allow me query ACF gallery fields:

<?php 

add_filter( 'bricks/posts/query_vars', function( $query_vars, $settings, $element_id ) {
// Adjust the element ID based on your the Query Loop element
if ( $element_id == 'mqpmdu' ) {
$query_vars['post__in'] = \Bricks\Integrations\Dynamic_Data\Providers::render_tag( '{acf_image_gallery}', get_the_ID(), 'image' );
}

return $query_vars;
}, 10, 3 );

I also added a load more button at the bottom with an interaction to load more images from the query when clicked. But when the product pop loads and I click on this button, nothing happens.
Nothing also happens if I turn on infinite scroll. It seems none of the ajax functions work in the popup. Is there some kind of clash with the Ajax that loads the popup?

image

Hi Oscar,
Thanks so much for your report!

We have already received a report on this by email and therefore have a task on the todo list :slight_smile:

Best regards,
timmse

1 Like