I have a flexible content inside a group field, I don’t understand how to call that flexible content, I tried this but it generates critical error.
$grp = get_field('all_content');
$flex = $grp['flex_content'];
if( have_rows($flex) ){
while ( have_rows($flex) ) {
the_row();
// Case: Paragraph layout.
if( get_row_layout() == 'content' ){
the_row();
echo get_sub_field('flex_content');
}
}
}
$grp = get_field('all_content');
$flex = $grp['flex_content'];
while(have_rows($grp)) {
if( have_rows($flex) ){
while ( have_rows($flex) ) {
the_row();
// Case: Paragraph layout.
if( get_row_layout() == 'content' ){
the_row();
echo get_sub_field('flex_content');
}
}
}
}