Show the publish date and time in the posts list
Adds a column to the posts list with the exact date and time each post was, or will be, published. Handy when you schedule a lot.
<?php
add_filter(
'manage_posts_columns',
static function ( $columns ) {
$columns['snipfire_published'] = __( 'Published' );
return $columns;
}
);
add_action(
'manage_posts_custom_column',
static function ( $column, $post_id ) {
if ( 'snipfire_published' === $column ) {
echo esc_html( get_the_date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $post_id ) );
}
},
10,
2
);
In these packs
- Posts and the editor: Make the block editor calmer and give pages excerpts, tags and categories.