Support

Account

Home Forums ACF PRO Multiple Taxonomies in a Repeater? Reply To: Multiple Taxonomies in a Repeater?

  • To display the rows of a repeater with taxonomy fields as subfields would look something like this.

    This code assumes that you are returning term objects from the taxonomy fields

    
    if (have_rows('repeater_field')) {
      while (have_rows('repeter_field')) {
        the_row();
        $name = get_sub_field('name_field');
        $title = get_sub_field('title_field');
        echo $name->name,': ',$title->name;
      }
    }
    

    for more information see
    have_rows: http://www.advancedcustomfields.com/resources/have_rows/
    taxonomy field: http://www.advancedcustomfields.com/resources/taxonomy/
    term object: http://codex.wordpress.org/Function_Reference/get_terms