Add Taxonomies to Screen Options and Post List

Everywhere I’ve checked for this information suggested installing additional plugins to enable support for this feature, or said that it was a lengthy and complicated process … but that is not true.

Simply set show_admin_column to true on your taxonomy in functions.php:

function main_taxonomy() {
 register_taxonomy(
 'my_tax',
 array('as_many', 'taxonomies', 'as_you_need'),
 array(
 'label' => __( 'Tax Types' ),
 'rewrite' => array( 'slug' => 'my_tax' ),
 'hierarchical' => true,
 'query_var' => true,
 'show_ui' => true,
 'show_in_menu' => true,
 'show_admin_column' => true, // where the magic happens
 )
 );
     }
add_action ( 'init', 'main_taxonomy' );
Products custom post type with two taxonomies in menu
products list view with taxonomies in list view

Leave a Reply

katherine as a flat graphic icon

About Me

I’m an African / Ojibwe First Nations Web Developer living in Winnipeg, Manitoba.

Visit the Tips and Blog to see what I’m working on.

%d bloggers like this: