/* Add Post ID Column in WordPress Posts and Pages List */
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;
}}
Source: GitHub
If you want to include Post/Page ID column in All Post/Pages List for Admin viewing purpose, add the above code to your child theme’s functions.php.
A new column will be added to the all posts and pages list. Some news publishing companies prefer to use post numbers in their permalink URLs. So, just by knowing the post ID, it is easy for them to search for that post in the backend.