<?php $group_values = rwmb_meta( 'cf-cloneable_group' ); if ( ! empty( $group_values ) ) { foreach ( $group_values as $group_value ) { $value = isset( $group_value['cf-sub-taxonomy'] ) ? $group_value['cf-sub-taxonomy'] : ''; //echo $value; // Display sub-field value //var_dump ($value); //echo $value[0]; //echo get_term ( $value[0], 'cf-sub-taxonomy' ) ->name; foreach ( $value as $val ) { $term_name = get_term( $val )->name; echo $term_name; } } } ?>
<?php $group_values = rwmb_meta( 'cfa-group_zavodni_den' ); if ( ! empty( $group_values ) ) { foreach ( $group_values as $group_value ) { $value = isset( $group_value['cfa-trat'] ) ? $group_value['cfa-trat'] : ''; //echo $value; // Display sub-field value //var_dump ($value); //echo $value[0]; echo get_term ( $value[0], 'cfa-trat' ) ->name; //foreach ( $value as $val ) { //$term_name = get_term( $val )->name; //echo $term_name; //} } } ?>
echo get_term($value[0], $taxonomy)->name