Support

Account

Home Forums ACF PRO Count acf repeater with radio value only Reply To: Count acf repeater with radio value only

  • Not easily. To do that you would need to loop over the repeater rows and get that sub field for each row and then add it to the count.

    
    // instead of $status = count( get_sub_field('sub_property_status') );
    $status = 0;
    if (have_rows('sub_property_status')) {
      while(have_rows('sub_property_status')) {
        the_row();
        if (get_sub_field('radio') == 'published value') {
          $status++;
        }
      }
    }