July 23, 2012 | By Sarah Gooding
[Example of above is if its sample looking on your page/post, and here is i know from her post at WPMU DEV facebook presentation also] SO, Enjoy!
For note : ID snippet its useful for SERPS, ever you seen when you browse something on Search Engine and in the bellow of search term any some like stars rating/author name/ID? yups, here is just how it work and put the manual plug in/some php function to yours template editor, So let we know for the step :
Add this snippet to your theme’s function.php file or create a little plugin for it, if you prefer:
add_filter('manage_posts_columns', 'posts_columns_id', 5);
add_action('manage_posts_custom_column', 'posts_custom_id_columns', 5, 2);
add_filter('manage_pages_columns', 'posts_columns_id', 5);
add_action('manage_pages_custom_column', 'posts_custom_id_columns', 5, 2);
function posts_columns_id($defaults){
$defaults['wps_post_id'] = __('ID');
return $defaults;
}
function posts_custom_id_columns($column_name, $id){
if($column_name === 'wps_post_id'){
echo $id;
}
}
After you add this snippet, navigate to Dashboard > Posts or > Pages to see the new column displaying IDs:
This is very useful snippet comes to you courtesy from Kevin Chard of WPSNIPP.com, where they’re now rocking more than 600 unique WordPress code snippets. Drop by his site and check out all the new snippets added recently.
Note: you can also check for this snippet work from your Google Webmaster , after you log in -> You can Click here [RED> link to redirected you to your Rich Snippets Testing Tool
You was reading tutorial ” How to add snippet Admin ID in WordPress “