I’ve searched the forums, but I can’t find a solution. I have an ACF repeater with an image element in it. That works flawlessly using a query loop, but I only want to display 2 images. Otherwise, the browser will download 10+ images, for example.
I know I can hide it with CSS, but the images will still get downloaded.
Is there a solution? I also tried using the Query Editor (PHP) but that didn’t return anything.
add_filter('bricks/query/result', function ($result, $query_obj) {
// Return all Elements except with the Bricks ID of "tudihi"
if ($query_obj->element_id !== 'tudihi') return $result;
$result = array_slice($result, 0, 2);
return $result;
}, 10, 2);
Change the ID for your Bricks ID (of the query-loop element (div / block).
Maybe it’s a bug, but it should also work with Filter: bricks/query/result_count, but i couldnt make it work