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:

    // 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?