Answers for "acf repeater new"

PHP
9

acf repeater

<?php

// ACF REPEATER - BASIC LOOP

// 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;

?>
Posted by: Guest on April-29-2020
-1

Acf Repeater setting check

add_filter('acf/load_field/name=my_field_name', 'my_acf_load_field');
function my_acf_load_field($field) {
  echo '<pre>'; print_r($field); echo '</pre>';
  return $field;
}
Posted by: Guest on April-20-2021

Browse Popular Code Answers by Language