Home Forums ACF PRO Taxonomy Terms Reply To: Taxonomy Terms

  • I guess I’m a newbie and didn’t realize that in a while loop you can run a get_row() to get the value of each loop.

    I found that when set to Taxonomy Terms and despite setting the “Return Value” to “Term object” get_row() only returns the term id. ( I guess I should change this back to ‘Term Id’ in case ACF fixes this bug in the future.)

    So I have to also run get_term($termid)

    Final result:

    $terms   = [];
    while ( have_rows( 'resources_carousel_topic_filter_list' ) ) : the_row();
       $terms[] = get_term(get_row());
    echo "<pre>\n";
    var_dump( $terms );
    echo "</pre>\n";