Created
February 17, 2017 15:49
-
-
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
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 | |
// Appends start time and venue to event titles | |
function tribe_events_title_include_time_venue ($title, $id) { | |
$separator = ' » '; // 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