Home › Forums › Backend Issues (wp-admin) › Display ACF from specific Taxonomy › Reply To: Display ACF from specific Taxonomy
You need to get the terms as set by WP for the post
https://developer.wordpress.org/reference/functions/get_the_terms/
$terms = get_the_terms($post->ID, 'repair_type');
This will return an array containing all of the selected terms. You need to loop over these and get the field from the term
if (!empty($terms) && !is_wp_error($terms)) {
foreach ($terms as $term) {
$repair_price = get_field('repair_price[, $term);
}
}
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.