Demonstration

Code
Simply put the code bellow in your theme’s functions.php file.
function mediaColumnsHeader($columns) {
$columns['medID'] = __('ID');
return $columns;
}
add_filter( 'manage_media_columns', 'mediaColumnsHeader' );
function mediaColumnsRow($columnName, $columnID){
if($columnName == 'medID'){
echo $columnID;
}
}
add_filter( 'manage_media_custom_column', 'mediaColumnsRow', 10, 2 );
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











Thats awesome and just what I was looking for. Thank you so much.
Am not too clear on what this achieves….what’s the point of this bit of code?Besides seeing the ID field….
@Avinash, reader asked how to do this (Tanner Hobin) so here it is.
And the point of this is to add another field in the media library listing that will show the IDs of the files.
Wrote 2 more on this topic. One for adding the field to “pages” listings and one for adding the field to “posts” listing.
The point is to have the ID in the table instead of hovering over the “edit” or “delete” and looking at the URL to see what’s the ID. This really helped me a couple of times when i needed to get the id of a specific post or page.
Also let’s look at an example, you download a WordPress theme, activate it go to the theme options and you see a field there where you should put the ID of a post you want to be shown as “featured”, you go to the post listing to get the ID but the ID isn’t in the posts table, and you don’t know how to get the ID.
So then you go to google to search for a way to find the ID of your posts, you find a couple of solutions, one is to go to phpMyAdmin to search for the ID there and the other is to hover over the “delete” or “edit” on the post listing to find out the ID.
Wouldn’t it be much easier if you simply had the IDs in the table?
I have no idea how big your knowledge on WordPress is, you might now how to get the ID but there are a lot of people that don’t.
So same goes for attachments, some theme will have an option for attachment id…
Clear enought?