Demonstration

It’s useful so you don’t have to hover over the category title and look at the link to see the category ID.
Solution
Simply add the code bellow in your theme’s functions.php file.
function categoriesColumnsHeader($columns) {
$columns['catID'] = __('ID');
return $columns;
}
add_filter( 'manage_categories_columns', 'categoriesColumnsHeader' );
function categoriesColumnsRow($argument, $columnName, $categoryID){
if($columnName == 'catID'){
return $categoryID;
}
}
add_filter( 'manage_categories_custom_column', 'categoriesColumnsRow', 10, 3 );
You might also want to check out how to do this for pages listing and how to do it for posts listing.
Our WordPress themes
We have a few WordPress themes that we would like you to take a look at if you want.
check out the portfolio











Could you modify this somehow, or is there another method, to achieve the same in-admin ID listing for posts?
@Cracks – Can be modified, come back in about 10 hours i will post it, i’m gone to sleep now (it’s really late).
as well as posts … pages too?
@noj – This one is for posts http://wpcanyon.com/tipsandtricks/wordpress-admin-panel-trick-adding-id-field-to-the-posts-listing/
It’s similar for pages, writing it now. Will be posted in 10mins.
Really appreciate the trick.
I’ve been trying to modify this to show an attachment ID column in the media library.
I don’t suppose you could take a quick look and see where my mistake is?
// Start Media Library Attachment ID Column Addition
function add_id_header($columns) {
$columns['attID'] = __(‘ID’);
return $columns;}
add_filter( ‘manage_media_columns’, ‘add_id_header’ );
function add_id_row($columnTitle, $att_ID){
if($columnTitle == ‘ID’){
echo $att_ID;}
}
add_filter( ‘manage_media_custom_column’, ‘add_id_row’, 10, 2 );
Thanks.
@Tanner, here you go. http://wpcanyon.com/tipsandtricks/adding-id-field-to-the-media-library-listing-in-wordpress-admin/
Hi Boba, fantastic and useful hack!
It works perfectly for the posts but I can’t make the code work for categories… Any idea?
Thanks a lot!
Also: the new column for IDs is pushing the other columns to the left side of the table. Is it possible to reduce the size of the ID column?
Thanks!
Wrote this long time ago, gonna need to recheck the WordPress source code to see how much flexibility custom columns have. Check back tomorrow.
Hi Boba, I just checked back today, any news?
Sorry Sullivan i completely forgot (really busy with my freelance wp dev projects), i’ll give it a look now and update the post as soon as i get it working.
No problem, no hurry. In fact I don’t know why it doesn’t work for category IDs since it works fine for post IDs. As for the flexibility custom columns have, I have no idea either.
Damn, I feel stupid *_*
WordPress 3.0 deprecated manage_categories_custom_column
Here’s a simple 1 page plugin (less than 80 lines, that works with 3.0) to show ids of Posts, Pages, Media, Links, Categories, Tags and Users in the admin panel:
http://wordpress.org/extend/plugins/simply-show-ids/
Thank you Steve, this plugin works great, indeed!
I will keep Boba’s code carefully since I always prefer to use code in function.php than a plugin.
Thank you both of you!
@Steve – Interesting. I forgot to check that, will update the post next week.
Hey all these little code snippets are great, thanks.
Adding the ID’s to the admin listings is a fantastic advantage when using wordpress as a cms. Although this categories one doesn’t seem to work on mine (I’m using v3.0). – Any ideas?
Just need the links and comments listings now, are they on here?
Also I added these to my own custom plugin rather than the functions file. Will you be releasing these as an Admin Panel Patch plugin? If not I’d be happy to publish my compilation of your code with all credit going to you guys of course.
Thanks again
@steve
Damn my enthusiasm for scrolling straight through to post my comment and missing your’s but a few line’s above. (Sorry Boba).
Still great minds think alike eh? Is the plugin based on the code snippets here?
Also I was wondering if there was a way to set the column width as mine come up way to wide for the ID’s?
Thanks Steve!
When I posted the code in WP 3.0, nothing happened, so going with the plugin. Very helpful addition!