Support

Account

Home Forums Add-ons Flexible Content Field Loop a flexible content field from inside a group field of an option

Solved

Loop a flexible content field from inside a group field of an option

  • Hi,

    I have an flexible content field inside a group field of an option field. I wonder how to run that flexible content fields loop.

    $group_field = get_field( 'group_field', 'option' );
    
    // $group_field['flexible_content']
    
    if( have_rows('flexible_content_field_name') ): ????
  • I just solved the problem…

    if( have_rows('group_field', 'option' ) ) {
        while ( have_rows( 'group_field', 'option' ) ) {
            the_row();
    
            if( have_rows( 'flexible_content_field_name_inside_the_group_field' ) ) {
                // do the flexible content thing
            }
        }
    }
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Loop a flexible content field from inside a group field of an option’ is closed to new replies.