Home › Forums › General Issues › How to get values from a CUSTOM taxonomy? › Reply To: How to get values from a CUSTOM taxonomy?
From documentation:
All the API functions can be used with a taxonomy term, however, a second parameter is required to target the term ID. This is similar to passing through a post_id to target a specific post object.
The $post_id needed is a string containing the taxonomy name + the term ID in this format: “$TaxonomyName_$TermID”
Examples
Display a field
<p><?php the_field('field_name', 'thetaxonomyname_7'); ?></p>
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.