ACF Repeater Field won't output

Hi there,
I’ve setup a field group named features that contains subfield named title (text), icon (image) and description (WYSIWYG). It’s linked to a dedicated post type. I simply cannot loop over those fields within my bricks template. The query loop of the container grabs the correct acf repeater field, the basic text and headline elements are also connected, but there is no output on the frontend. I am thankfull for any hint in the right direction.

I try to achieve a simple feature listing like this:

Hello. First of all, you need to create a loop for the block, and then receive dynamic data

Hello clickfusion63. Thanks for the feedback. I already did this. The Container Block is set to the corresponding ACF Repeater Field. If I check for {post_id} within a rich text element I will get the two repeater fields I’ve setup, but I cannot access the content.
Screenshot 2023-12-15 221653
Screenshot 2023-12-15 221710

… oh boy. My fault. I used a script from the forum to use the gallery field with the nested slider element:

This clashes somehow with acf. I’ve removed the script and the output is now correct and as expected. Can someone kindly explain me why this clashes with repeater fields? It was not possible to loop over gallery field images within the nested slider so I stumbled over this solution.

add_filter( 'bricks/setup/control_options', function( $control_options ) {
    $control_options['queryTypes']['residence_images'] = esc_html__( 'Residence Images', 'as' );
    return $control_options;
} );

add_filter( 'bricks/query/run', function( $results, $query_obj ) {
    switch ( $query_obj->object_type ) {
        case 'residence_images':
            $images = get_field( 'residence_images' );
            if ( ! empty( $images ) ) {
                $results = $images;
            }
            break;
    }
    
    return $results;
}, 10, 2 );

add_filter( 'bricks/query/loop_object', function( $loop_object, $loop_key, $query_obj ) {
    switch ( $query_obj->object_type ) {
        case 'residence_images':
            global $post;
            $post = get_post( $loop_object['ID'] );
            setup_postdata( $post );
            break;
    }
    
    return $post;
}, 10, 3 );

Hi, did you found a solution? i have right now the same issue :frowning:

OK on the linked post, here is a good solution with Query-Builder :slight_smile: this works now fine for me.

/* use gallery field id from ACF or JetEngine */
$gallery_images = get_field("my_gallery");
/* in case you want to use ACF Option field */
// $acf_images = get_field("my_gallery", "option");

if(!empty($gallery_images)) {

return [
    'post_type'      => 'attachment',
    'post_mime_type' => 'image',
    'post_status'    => 'inherit',
    'orderby'        => 'post__in',
    'post__in'       => $gallery_images,
    'posts_per_page' => -1,
]; }

else {

  	return [];

}