How to add a column to taxonomy overview page?

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),
    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:

Taxonomy overview page - before
Taxonomy overview page - before

After altering:

Taxonomy overview page - after
Taxonomy overview page - after

About the Author

Goran Nikolovski is a creator, speaker, open-source contributor, web developer specialized in Drupal and DevOps enthusiast. He is the founder of this website and he enjoys sharing his knowledge and experiences.