All Topics
Taxonomy Terms inside Repeater showing ID’s
Hi i have a Repeater Field with a Taxonomy Terms Field set to Return Value “Term object”
Unfortunately i see the Terms ID instead of the Term title.
Before AC v7 i had this Hook, but know with your new Version you killed the hook:
function ac_column_value_custom_field_example( $value, $id, AC\Column $column ) {
$column_name = $column->get_name();
if( $column_name == '63f4f1f7af5c28' || $column_name == '63f4f238f47ae0' ) {
$values = str_replace(array('<div class="ac-repeater-divider">', '</div>'), array(',', ''), $value);
$values_arr = explode(',', $values);
$value=''; $i=0; $values_length=count($values_arr);
foreach ($values_arr as $values) {
$i++;
$term_name = get_term( $values )->name;
$div = ( $i < $values_length ) ? '<div class="ac-repeater-divider"></div>' : '';
$value .= $term_name . $div;
}
$value = $value;
}
return $value;
}
add_filter( 'ac/column/value', 'ac_column_value_custom_field_example', 10, 3 );
You must be logged in to reply to this topic.