Hi everyone! Ihave Flexible content field in a Group field. How to request to Flexible content correctly?
https://prnt.sc/ts0jja
And such code:
<?php
if( have_rows('content') ):
while ( have_rows('content') ) : the_row();
if( get_row_layout() == 'paragraph' ):
$text = get_sub_field('text');
echo $text;
elseif( get_row_layout() == 'download' ):
$file = get_sub_field('file');
echo $file;
endif;
endwhile;
endif;
?>
If it’s out of Group it works. But in, of course, not. So how i have to request to it? Thanks in advance!
Already solved:
<?php
if( have_rows('group_content') ):
while ( have_rows('group_content') ) : the_row();
if( get_row_layout() == 'paragraph' ):
$text = get_sub_field('text');
echo $text;
elseif( get_row_layout() == 'download' ):
$file = get_sub_field('file');
echo $file;
endif;
endwhile;
endif;
?>