Skip to content

Instantly share code, notes, and snippets.

@tomfinitely
Created June 12, 2015 18:37
Show Gist options
  • Save tomfinitely/9cb95b2748f809e95f4a to your computer and use it in GitHub Desktop.
Save tomfinitely/9cb95b2748f809e95f4a to your computer and use it in GitHub Desktop.
GSFC Attempt 1
//* Genesis Featured Sandbox - Switch to Blog 1
add_action ( 'gsfc_before_post_content','add_event_info', 10);
function add_event_info(){
global $post;
if (tribe_get_start_date() !== tribe_get_end_date() ) {
echo tribe_get_start_date( null, false, 'l\, F jS' ) . ' from <meta itemprop="startDate" content="' . tribe_get_start_date( null, false, 'Y-m-d-h:i:s' ) . '"/>' . tribe_get_start_date(null, false, 'g:i a') . 'to <meta itemprop="endDate" content="' . tribe_get_end_date( null, false, 'Y-m-d-h:i:s' ) . '"/>' . tribe_get_end_date(null, false, 'g:i a');
} else {
echo '<div class="all-day">
<meta itemprop="startDate" content="' . tribe_get_start_date( null, false, 'Y-m-d-h:i:s' ) . '"/>' . tribe_get_start_date(null, false, 'l\, F jS \a\t g:i a') . '</div>';
}
if(tribe_get_venue()) {
if( class_exists( 'TribeEventsPro' ) ) {
tribe_get_venue_link( get_the_ID(), class_exists( 'TribeEventsPro' ) );
} else {
echo tribe_get_venue( get_the_ID() );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment