Steps
-
Add the PHP code to your child theme’s
functions.phpfile or the Code Snippets plugin. -
Save and activate the snippet.
-
Go to WordPress Admin → Posts → All Posts.
Hook Used
-
manage_posts_columns— Adds the new column. -
manage_posts_custom_column— Displays the last modified date.
Type: WordPress Admin Customization
Output: A Last Modified column appears in the posts list, showing when each post was last updated.
Why use this snippet? It helps you quickly identify recently updated posts without opening each post individually.
function custom_add_modified_date_column( $columns ) {
$columns['modified_date'] = 'Last Modified';
return $columns;
}
add_filter( 'manage_posts_columns', 'custom_add_modified_date_column' );
function custom_display_modified_date_column( $column, $post_id ) {
if ( 'modified_date' === $column ) {
echo esc_html( get_the_modified_date( 'M j, Y', $post_id ) );
}
}
add_action( 'manage_posts_custom_column', 'custom_display_modified_date_column', 10, 2 );
Tested on
Reported by the author on October 9, 2026. WPFolks has not verified this.
Not tested against WordPress 7.1.3. It may still work.