I am trying to use ACF repeater field from the options page , but its not showing anything on the Frontend, is there any known issue with ACF repeater and options page. its working fine if repeater is used inside the Product page ( backend )
What code are you using to show the repeater field? Are you using the post ID of “options” when getting the field?
THis is the test code I am using
if( have_rows(‘label’) ):
while( have_rows(‘label’) ) : the_row();
$image = get_sub_field(‘test1’);
echo “<p>”.$image.”</p>”;
endwhile;
else :
echo “<p> R: “.get_field(‘logos’).”</p>”;
endif;
This is the test code I am using
if( have_rows(‘label’) ):
while( have_rows(‘label’) ) : the_row();
$image = get_sub_field(‘test1’);
echo “<p>”.$image.”</p>”;
endwhile;
else :
echo “<p> R: “.get_field(‘logos’).”</p>”;
endif;
it should be
if (have_rows('repeater_field_name', 'options')) {
while (have_rows('repeater_field_name', 'options')) {
the_row()
$image = get_sub_field('field_name');
}
}
https://www.advancedcustomfields.com/resources/get-values-from-an-options-page/