The taxonomy overview page is not a listing of entities built with the entity list builder, and it's not a View. It's just a regular form, and that means that we can use the form_alter() hook to include additional columns.
Let's see how to add a new column named Status:
/**
* Implements hook_form_ID_alter().
*/
function MODULE_NAME_form_taxonomy_overview_terms_alter(&$form, FormStateInterface $formState) {
$form['terms']['#header'] = array_merge(array_slice($form['terms']['#header'], 0, 1, TRUE),
[t('Status')],
array_slice($form['terms']['#header'], 1, NULL, TRUE));
foreach ($form['terms'] as &$term) {
if (is_array($term) && !empty($term['#term'])) {
$status['status'] = [
'#markup' => ($term['#term']->status->value) ? t('Published') : t('Unpublished'),
'#type' => 'item',
];
$term = array_slice($term, 0, 1, TRUE) +
$status +
array_slice($term, 1, NULL, TRUE);
}
}
}
I didn't write this code myself, but since it is very useful I'm sharing it here. I found it in the Thunder's Taxonomy module.
Before altering:
After altering: