The hooks for taxonomies are:
"manage_edit-${taxonomy}_columns"
for the header"manage_edit-${taxonomy}_sortable_columns"
to make columns sortable"manage_${taxonomy}_custom_column"
for the cell content
To catch all taxonomies write:
foreach ( get_taxonomies() as $taxonomy ) {
add_action( "manage_edit-${taxonomy}_columns", 't5_add_col' );
add_filter( "manage_edit-${taxonomy}_sortable_columns", 't5_add_col' );
add_filter( "manage_${taxonomy}_custom_column", 't5_show_id', 10, 3 );
}
add_action( 'admin_print_styles-edit-tags.php', 't5_tax_id_style' );
function t5_add_col( $columns )
{
return $columns + array ( 'tax_id' => 'ID' );
}
function t5_show_id( $v, $name, $id )
{
return 'tax_id' === $name ? $id : $v;
}
function t5_tax_id_style()
{
print '<style>#tax_id{width:4em}</style>';
}
Related Posts:
- Get rid of WordPress category, tag and author archives?
- How to create a widgetized sidebar for every category dynamically?
- Only show category to certain user levels without plugin
- Add category to custom post type automatically, using category slug
- List Categories of the Parent Category of the Current Category
- exclude category from WordPress Form function
- wp_list_categories, Add class to all list items with children
- On Category page, How can I get the category ID?
- Remove “Parent” Selection When Adding/Editing Categories?
- Check is category parent or not from its ID
- How to show in search results posts with a particular tag in a particular category?
- How can I get an tag to wrap each ancestor that gets outputted in this condition?
- If category is in parent category?
- If in category to be inside of a function
- How to get category URL with the slug?
- How to view WordPress’ default category IDs?
- Rename Default Category (Uncategorized) Via a Function
- Check child/parent categories if exists
- Getting URL of archive (category) page
- How to show only one category in breadcrumb navigation
- Query posts from category based on a filter most favorited
- Style category link depending on category ID
- Add tag parameter to category.php
- Random Featured Image Based on Category
- add slug beside name in Admin Category Checklists
- Change div background acording to the selected category
- Edit tag_id in category pages of dashboard
- How to use wp_list_categories with plugin category?
- How to get selected taxonomy or category ID if using custom walker?
- Redirect depending on category chosen
- How to add icon over specific thumb
- How to load several hierarchical categories from functions.php
- Check is category parent with ids from the childs – get_term_children
- Change Default Content when Creating a Post based on Previous Category Choice
- How to add a custom thumbnail size for a specific category?
- create function to call category name and slug
- Different size video display for category page (smaller) & detail page (larger)
- Store All Post Categories In Array
- Code to display category-specific single.php is overriding normal single.php, too
- Loop Through Categories in Custom Field
- Function to list posts from current post’s category fails in WP 3.8
- Show only one category in main query, issues on tag page
- Show parent-child relationship for categories in the wordpress admin
- How to define category ID in an array?
- How can I reduce the number of database query calls for this custom homepage?
- How to convert regular categories to custom taxonomy?
- What could be causing my wp_query pagination to break?
- Return array of categories to php function
- Removing the number in a category slug
- Custom Stylings for category pages
- If newest post of category is newest post in general, skip first post of category
- Taxonomies for WordPress Media Library [duplicate]
- Taxonomy filter all children
- Bulk category update is not updating
- WC 3.x Get categories from variable product of the cart
- URL path for wordpress categories
- Automatically adding categories and authors in custom menu?
- Checkboxes in the category list?
- Automatically exclude categories from metabox based on title
- How to display post categories within the Latest Posts block?
- How can I edit the ‘Most Used’ tab in the categories meta-box to show another custom taxonomy?
- Does “show_option_all” in wp_list_categories do anything?
- redirecting from a general category page to another specific one
- How to do paging in the loop?
- query_posts not reading correct categories
- how to nest specific category thumbnails inside different containers
- Eliminate word from $term->name
- Is there any way to check which wordpress categories was created by which user?
- Adding a block with query in homepage
- Category view with contents of [gallery]s shown
- How can I include custom category and tag base in template files?
- query_post problem
- Display all Categories
- custom wp_list_categories in single.php
- How to move a post from one category to another
- Is this process OK to replace URL structure?
- How can i echo next and previous custom category from a Taxonomy
- No hierarchy in wp_list_categories with child of and depth
- How to check a category checkbox using JavaScript
- Need help to structure our a complex hierarchy
- global categories – Share specific categories in wordpress multisite
- WordPress update 4.7 – the 70.000+ news posts became “Uncategorized”
- create post with main category and other categories from admin panel
- How To Display Category list from Portfolio post type plugin?
- How Can Hide Define Category in Post Contents?
- How to auto update post title and slug with category name when post status is updated
- get_posts – require all categories
- 404 error when i try to search by category or by tag
- Choosing different templates for categories
- Problem with wp_list_categories
- hierarchical taxonomy in permalinks? using same slug
- WordPress Numeric Pagination with Query String [duplicate]
- Changing Permalinks for Category Pages Only
- Get post by Category in custom template
- Ajax call activate after submit in edit-tags.php page
- Assign a category by user and customize the edit-tags.php?taxonomy=category page
- comments_number fails to print
- Sorting Woocommerce products by category and attributes
- How to show child category name & post from it’s parent [closed]
- Open everything in new tab