Support

Account

Home Forums Front-end Issues Custom taxonomy slug not ID (again, i know) Reply To: Custom taxonomy slug not ID (again, i know)

  • The code you posted is not getting the terms from the ACF field but with standard WP functions. You can do it that way.

    If you’re using a radio field then it’s returning a single field and if it’s set to return the ID then….

    
    $taxonomy = 'your-taxonomy'; // change this to your taxonomy
    $term_id = get_field('tecnica');
    $term = get_term_by('id', $term_id, $taxonomy);
    echo $term->name;
    

    It would be easier to return the term object, then you can just do

    
    $term = get_term('tecnica');
    echo $term->name;