I have a custom post type : drink recipes.
Inside there is a custom field group.
<div>
<?php
$groups = rwmb_meta( 'detailed_ingredients_ingredients_group' );
foreach ( $groups as $group ) {
// Field amount_text:
echo $group[ 'amount_text' ] ?? '';
// Field unit_ta:
$term_id = $group[ 'unit_ta' ] ?? 0;
$term = get_term( $term_id );
?>
<p><a>"><?= $term->name ?></a></p>
<?php
// Field ingredient_ta:
$term_id = $group[ 'ingredient_ta' ] ?? 0;
$term = get_term( $term_id );
?>
<p><a>"><?= $term->name ?></a></p>
<?php
}
?>
</div>
If i choose // Field ingredient_ta: $term_id = $group[ 'ingredient_ta' ] and select a term, i would like to show the related or connected term, with the current choosen one.
Like i choose for example Vodka Brand Name 1 = ingredient_ta,
and with either a relationsship or a custom field connected to a term (taxonomy = beverage-category). I would like do display the Vodka Category. Somehow i could not find a way trough it.