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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.