I have a problem with the repeater field in Acf Pro. I want to retrieve fields inside the foreach but it gives me "null" value.
Can someone help me?
My code:
function label_text( $post_id = '' ) { while( have_rows('description', $post_id) ): the_row(); $description .= get_sub_field('label') . get_sub_field('text'); endwhile; return $description; }
foreach ( $query->posts as $id ) { $label_text = label_text( $id ); $logo = get_field('logo', $id); $results[ get_the_title( $id ) ] = array( 'id' => $id, 'description' => $label_text, 'logo' => $logo['url'], 'type' => get_post_type($id), ); }
$logo
?$results
?