Answers for "acf custom fields repeater"

PHP
1

get acf repeater field

if( have_rows('rating_field') ):
  while ( have_rows('rating_field') ) : the_row();
    $title = the_sub_field('rating_title');
    $number = the_sub_field('rating_number');

    echo $title;
    echo $number;
  endwhile;
else :
endif;
Posted by: Guest on September-21-2021
1

acf options repeater

<?php if( have_rows('repeater', 'option') ): ?>

    <ul>

    <?php while( have_rows('repeater', 'option') ): the_row(); ?>

        <li><?php the_sub_field('title'); ?></li>

    <?php endwhile; ?>

    </ul>

<?php endif; ?>
Posted by: Guest on October-21-2021

Browse Popular Code Answers by Language