Support

Account

Home Forums ACF PRO WPML, ACF 5.0.9 and Options Page Reply To: WPML, ACF 5.0.9 and Options Page

  • I’ve simple used a workaround related to your little function.
    The problems with repeater and flexible coming with functions ‘have_rows()’ and ‘the_row()’. It’s like using the loop, outside the loop.

    <?php
    
    // Set language to default
    add_filter('acf/settings/current_language', 'cl_acf_set_language', 100);
    
    // check if the repeater field has rows of data
    if( have_rows('repeater_field_name') ):
    
     	// loop through the rows of data
        while ( have_rows('repeater_field_name') ) : the_row();
    
            // display a sub field value
            the_sub_field('sub_field_name');
    
        endwhile;
    
    else :
    
        // no rows found
    
    endif;
    
    // Set language to current
    remove_filter('acf/settings/current_language', 'cl_acf_set_language', 100);
    
    ?>

    I see right now a better solution would be to use repeater/flexible content data as an array. It should work that way, i guess.