Last active
October 23, 2017 00:26
-
-
Save jesseeproductions/f4b175d407efa48564a9 to your computer and use it in GitHub Desktop.
The Events Calendar - Change the Event/Events, Venue/Venues, and Organizer/Organizers
This file contains hidden or 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
/** | |
* The Events Calendar - Change the Event/Events | |
* | |
* Add to a theme's functions.php or through a custom plugin | |
* | |
* Does not change the slug to change that change this setting: "Events URL slug" and this setting "Single event URL slug" | |
* Setting is on Events > Settings > General Tab | |
* @since 3.10 | |
*/ | |
add_filter( 'tribe_event_label_singular', 'tec_change_event_label' ); | |
function tec_change_event_label() { | |
return 'Class'; | |
} | |
add_filter( 'tribe_event_label_plural', 'tec_change_event_label_plural' ); | |
function tec_change_event_label_plural() { | |
return 'Classes'; | |
} | |
/** | |
* The Events Calendar - Change the Venue/Venues | |
* | |
* Add to a theme's functions.php or through a custom plugin | |
* | |
* This changes the venue slug, resave permalinks on your site after adding this filter to prevent 404 errors | |
* @since 3.10 | |
*/ | |
add_filter('tribe_venue_label_singular', 'tec_change_venue_label' ); | |
function tec_change_venue_label() { | |
return 'Classroom'; | |
} | |
add_filter('tribe_venue_label_plural', 'tec_change_venue_label_plural' ); | |
function tec_change_venue_label_plural() { | |
return 'Classrooms'; | |
} | |
/** | |
* The Events Calendar - Change the Organizer/Organizers | |
* | |
* Add to a theme's functions.php or through a custom plugin | |
* | |
* This changes the organizer slug, resave permalinks on your site after adding this filter to prevent 404 errors | |
* @since 3.10 | |
*/ | |
add_filter('tribe_organizer_label_singular', 'tec_change_organizer_label' ); | |
function tec_change_organizer_label() { | |
return 'Teacher'; | |
} | |
add_filter('tribe_organizer_label_plural', 'tec_change_organizer_label_plural' ); | |
function tec_change_organizer_label_plural() { | |
return 'Teachers'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment