Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Add post date column to the events WP List Table (TEC 4.x)
<?php
/**
* The Events Calendar: Add "Post Date" column to the wp-admin Events posts list.
*
* @link https://gist.github.com/barryhughes/38d7131462bd3912e571d5e6f3b5762e
*/
add_action( 'manage_posts_custom_column', 'events_post_date_column', 10, 2 );
add_filter( 'manage_tribe_events_posts_columns', 'events_post_date_column_header' );
function events_post_date_column( $column_id, $post_id ) {
echo 'post_date' === $column_id ? get_the_date( '', $post_id ) : '';
}
function events_post_date_column_header( $headers ) {
$headers['post_date'] = 'Post Date';
return $headers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment