I’m not 100% sure, but I think your code should be something like this:
$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 );
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?
Viewing 4 posts - 1 through 4 (of 4 total)
The topic ‘Output from related Taxonomy’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users