Plugin To Show Post or Page ID in WordPress Admin

All the IDs on all admin pages have been removed in WordPress Admin Panel. Propably due to the fact that the common user don’t need or understand this IDs. However, for advanced WordPress users and developers those IDs are quite important sometimes like for some plugins or designing template. So it is really helpful if developers can see the posts or pages or categories IDs in a new column. There are two popular plugins available to do that. Lets explore this plugins.

First One is Reveal IDs:

show wp post id

This plugin does is to reveal most removed entry IDs on admin pages as well as categories, links, media, users, comments, link categories, custom taxonomies, custom post types IDs. After installing the plugin you will find the setup menu under settings page. In fact you don’t need to change any settings. After activating the plugin you will see the new column ID:

show-post-id3

Second One is WPsite Show IDs:

This plugin also does the same thing.It does not need any configuration. Simply activate the plugin and IDs will be displayed on all admin pages.

show-post-id2

Don’t Want to Use Plugin?

If you are a developer or just do not want to use a plugin to reveal IDs then you can do this by adding the following code in your theme function to show post and page IDs:

[html]add_filter( ‘manage_posts_columns’, ‘revealid_add_id_column’, 5 );
add_action( ‘manage_posts_custom_column’, ‘revealid_id_column_content’, 5, 2 );

add_filter( ‘manage_pages_columns’, ‘revealid_add_id_column’,5 );
add_action( ‘manage_pages_custom_column’, ‘revealid_id_column_content’, 5, 2 );

function revealid_add_id_column( $columns ) {
$columns[‘revealid_id’] = ‘ID’;
return $columns;
}

function revealid_id_column_content( $column, $id ) {
if( ‘revealid_id’ == $column ) {
echo $id;
}
}

add_filter( ‘manage_posts_columns’, ‘revealid_add_id_column’, 5 );
add_action( ‘manage_posts_custom_column’, ‘revealid_id_column_content’, 5, 2 );

add_filter( ‘manage_pages_columns’, ‘revealid_add_id_column’,5 );
add_action( ‘manage_pages_custom_column’, ‘revealid_id_column_content’, 5, 2 );

function revealid_add_id_column( $columns ) {
$columns[‘revealid_id’] = ‘ID’;
return $columns;
}

function revealid_id_column_content( $column, $id ) {
if( ‘revealid_id’ == $column ) {
echo $id;
}
}

[/html]

Author: mytutorialguru

Share This Post On

Submit a Comment

Your email address will not be published. Required fields are marked *