Support

Account

Home Forums Add-ons Repeater Field How to hide an empty row working with Custom Field Repeater? Reply To: How to hide an empty row working with Custom Field Repeater?

  • You have some issues with the nesting of your code and I could not figure out the problems so that I can edit it. This is basically what you need to do.

    
    while (have_rows('repeater_field')) {
      the_row();
      // check all sub fields and only display if there are values
      if (get_sub_field('sub_field_1') && get_sub_field('sub_field_1')) {
        // only do this if all sub fields have content
      }
    }