Home › Forums › General Issues › Output from related Taxonomy › Reply To: Output from related Taxonomy
Hi @Ron Willemse
I’m not 100% sure, but I think your code should be something like this:
<?php
// vars
$current_term = $wp_query->queried_object;
// use get_field to find the related taxonomy.
$related_term = get_field('field name from taxonomy shops ', $current_term->taxonomy . '_' . $current_term->term_id);
// Depending on the return type setting (ID / Object), you need to then use that data to load the field from.
$related_term_field = get_field('field_name', $related_term->taxonomy . '_' . $related_term->term_id );
echo $related_term_field;
?>
If that deosn’t look write, perhaps you could clearly define the steps needed to get the data you want from the current taxonomy term?
Thanks
E
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.