Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Created August 30, 2016 23:20
Show Gist options
  • Save cliffordp/bb50c2fcd7f1fc9442e76d433ff5916b to your computer and use it in GitHub Desktop.
Save cliffordp/bb50c2fcd7f1fc9442e76d433ff5916b to your computer and use it in GitHub Desktop.
Display the Start Time and Date (not just the Date) in wp-admin > Events -- events list columns
<?php
// Display the Start Time and Date (not just the Date) in wp-admin > Events -- events list columns
// By Barry
// from https://gist.github.com/cliffordp/bb50c2fcd7f1fc9442e76d433ff5916b
function cliff_events_admin_add_start_time( $column_id, $post_id ) {
if ( 'start-date' !== $column_id ) return;
$time = tribe_get_start_date( $post_id, true, get_option( 'time_format' ) );
echo " @ <span class='event-start-time'> $time </span> ";
}
add_action( 'manage_tribe_events_posts_custom_column', 'cliff_events_admin_add_start_time', 20, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment