Add custom columns in dashboard term list
/*
===================================================
Agrega Columnas en Taxonomias
===================================================
*/
add_filter("manage_edit-historia_columns", 'theme_columns');
function theme_columns($theme_columns) {
$new_columns = array(
'cb' => '<input type="checkbox" />',
'name' => __('Name'),
'combination' => __('Combinacion'),
'slug' => __('Slug'),
'posts' => __('Posts')
);
return $new_columns;
}
// Add to admin_init function
add_filter("manage_historia_custom_column", 'manage_theme_columns', 10, 3);
function manage_theme_columns($out, $column_name, $theme_id) {
$theme = get_term($theme_id, 'historia');
switch ($column_name) {
case 'combination':
// get header image url
$data =
$out .= get_field("combination", "historia_" . $theme_id );
break;
default:
break;
}
return $out;
}