Steps
- Add the PHP code to your theme’s
functions.php. - Save the changes.
- Go to WordPress Dashboard → Pages → All Pages.
- A new Page ID column will appear.
- Each page will show its unique ID.
/**
* Add Page ID column to WordPress Pages list
*/
function custom_add_page_id_column( $columns ) {
$columns['page_id'] = 'Page ID';
return $columns;
}
add_filter( 'manage_pages_columns', 'custom_add_page_id_column' );
/**
* Display Page ID in the custom column
*/
function custom_display_page_id_column( $column, $post_id ) {
if ( 'page_id' === $column ) {
echo esc_html( $post_id );
}
}
add_action(
'manage_pages_custom_column',
'custom_display_page_id_column',
10,
2
);
Tested on
WordPress 6.8
Reported by the author on October 2, 2026. WPFolks has not verified this.
Not tested against WordPress 7.1.3. It may still work.