Site icon Hip-Hop Website Design and Development

Show Customized Column in CPT Taxonomy

I’m making an attempt so as to add a column to one in every of my customized publish varieties, however solely on the edit taxonomy web page.

I’ve a taxonomy registered known as “event-categories” for my customized publish kind “occasions”.

I can efficiently add the customized column to the customized publish kind edit display screen, however can not seem to get the hook to work on the edit taxonomy web page.

Digging by a few of the core, I used to be capable of find the hook

$taxonomies = apply_filters( "manage_taxonomies_for_{$post_type}_columns", $taxonomies, $post_type );

within class-wp-posts-list-table.php which might lead me to imagine it’s attainable to hook into, and add customized columns to this web page. However when hooking in so as to add the column, nothing really happenes.

operate events_color_column($defaults) {
    $defaults['event_cat_color'] = 'Occasion Class Coloration';
    return $defaults;
}

operate events_column_content($column_name, $post_ID) {
    if ($column_name == 'event_cat_color') {
       echo 'Occasion Coloration : #2432';
    }
}
add_filter('manage_taxonomies_for_events_columns', 'events_color_column');
add_action('manage_taxonomies_for_events_column', 'events_color_column_content', 10, 2);

but when I merely change the filter+motion to ‘manage_events_columns’ and ‘manage_events_column’ issues work on the customized publish kind display screen.

Can somebody see what I’m doing unsuitable right here, or is that this a bug that must be patched in core?

Edit:

I used to be capable of hook into the customized taxonomy web page to show the column header, by doing the next:

To anybody else going through related points, it’s essential to move within the web page ID. For me, the next labored:

  add_filter('manage_edit-event_categories_columns', 'events_color_column');

However I am unable to appear to determine why the content material is not printing into every column utilizing

  add_action('manage_edit-event_categories_custom_column', 'events_color_column_content', 10, 2);

I’ve additionally tried passing within the taxonomy title, the publish kind title, however nothing appears to work. What am I lacking right here?