Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geoffgraham/2f56d20efa8f5f786f8c09c60d3b9ff7 to your computer and use it in GitHub Desktop.
Save geoffgraham/2f56d20efa8f5f786f8c09c60d3b9ff7 to your computer and use it in GitHub Desktop.
The Events Calendar 4.4.2 // Append Start Time and Venue to Event Titles
<?php
// Appends start time and venue to event titles
function tribe_events_title_include_time_venue ($title, $id) {
$separator = ' &raquo; '; // Separator between categories and title
if (tribe_is_event($id) && !is_single()) {
$title = $title . $separator . tribe_get_start_time() . $separator . tribe_get_venue();
}
return $title;
}
add_filter('the_title', 'tribe_events_title_include_time_venue', 100, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment