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

    • Johann

    • September 21, 2018 at 11:43 pm

    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') ): ????
    • Johann

    • September 22, 2018 at 1:26 am

    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)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.