Demonstration

Solution
Insert the code bellow in your theme’s function.php file.
function postsColumnsHeader($columns) {
$columns['postID'] = __('ID');
return $columns;
}
add_filter( 'manage_posts_columns', 'postsColumnsHeader' );
function postsColumnsRow($columnTitle, $postID){
if($columnTitle == 'postID'){
echo $postID;
}
}
add_filter( 'manage_posts_custom_column', 'postsColumnsRow', 10, 2 );
You might also want to check out how to do this for pages listing and how to do it for categories 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











I can understand how this would be helpful for categories, and potentially pages, and I’ll definitely be including them in all of my work from now on. But could you tell me what someone would need to know the post id for? I don’t think I’ve ever actually had to use it outside of the loop.
Well let’s look at this example, you make a theme that has theme options in the admin panel. The theme options amongst other things offer the user to hide some posts from the blog’s list of posts, and there is a text input where the user needs to enter the IDs of the posts he want to hide. So to save him some time of googling to find out how to get the id of a post you allow him to see the IDs in the admin post listing.
Hope that’s clear enough, and there are probably many many better examples, but this one was first on my mind.
Hi,
Anyone have any ideas how I can add a coloum to the comment edit admin panel to display (ideally editing as well) custom meta stored with comment extra fields?
Been looking for a solution for ages and cant get my head round it!!
Cheers
Ben
@BAC (Ben) – Interesting question, i’ll see if i can figure it out.
Good tip, is it possible to display the URL or post Slug using same way ?
Thanks,
Anthony
How about adding a meta key in the admin panel? Is that possible also?
How would I go about making this function specific to a custom post type?