Support

Account

Home Forums ACF PRO Sub_field Taxonomy term, returning ID only… need value Reply To: Sub_field Taxonomy term, returning ID only… need value

  • Got it! Slight adaptation of John’s code above – basically, for anyone else that might need it, I needed to pull in the value for $term_id from the ID given in the sub_field, so:

    $term = get_term_by('id', $term_id, 'wgd_jurisdiction');
    					echo $term->name;

    Becomes…

    $term = get_term_by('id', get_sub_field('ques_jurisdiction'), 'wgd_jurisdiction');
    echo($term->name);

    Hopefully this helps others – thanks again John for pointing me in the right direction.