Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save barryhughes/38d7131462bd3912e571d5e6f3b5762e to your computer and use it in GitHub Desktop.
Save barryhughes/38d7131462bd3912e571d5e6f3b5762e to your computer and use it in GitHub Desktop.
Add post date column to the events WP List Table (TEC 4.x)
<?php
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;
}
add_action( 'manage_posts_custom_column', 'events_post_date_column', 10, 2 );
add_filter( 'manage_tribe_events_posts_columns', 'events_post_date_column_header' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment