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;
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.