Home › Forums › General Issues › Display Custom Taxonomy Fields on CPT › Reply To: Display Custom Taxonomy Fields on CPT
The first thing you need to do is get the term in the taxonomy that the post is in
$terms = get_object_terms($post->ID, 'TAXONOMY SLUG HERE');
this will return an array of terms that the post is in, assuming there is only one
$term = $terms[0];
now you can use this to get the fields from the term
$value = get_field('field on term/taxonomy', 'term_'.$term->term_id;);
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.