Created
May 4, 2018 20:53
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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