Home › Forums › Calendar Products › Events Calendar PRO › Changing the Calendar default title
- This topic has 5 replies, 3 voices, and was last updated 12 years, 2 months ago by
Barry.
-
AuthorPosts
-
January 16, 2014 at 6:59 am #93483
yohogdes
ParticipantHi there,
I’m trying to change the page title that is being displayed in the H2 “.tribe-events-page-title”.Currently I have two Categories setup in my site “Events” and “Classes”. The default behavior of the plugin is to display the phrase “Upcoming Events >” followed by the Category name. I would like to change the display from “UPCOMING EVENTS › EVENTS” to “UPCOMING EVENTS” or to be more clear: “UPCOMING CLASSES”.
Where in the code could I effect the page title being displayed? If possible I’d like to change it out of the core of the plugin so that I do not have any issues when updating. I’m using these Category archives as my primary means of displaying events on separate templates.. I’d like to make it transparent that they are categories and only display the category title as “UPCOMING EVENTS > CLASSES” is incorrect for my particular client.
Any help you can provide would be wonderful.
Thank you for your time!January 16, 2014 at 2:43 pm #93688Julie Kuehl
ParticipantHi yohogdes,
I think I might have just the thing for you. Have you seen this? https://theeventscalendar.com/altering-or-removing-headings-on-calendar-views/
Will that work?
— Julie
January 22, 2014 at 11:44 pm #95939yohogdes
ParticipantHi Julie,
This is a great solution if I were only dealing with one category, however I need a different title to appear conditionally based on the current category.I attempted to alter the code provided and target the current category name, but was unsuccessful.
This is what I tried in my functions.php file:
// Customize Tribe Events Titles
add_filter(‘tribe_get_events_title’, ‘change_upcoming_events_title’);function change_upcoming_events_title($title) {
//We’ll change the title on upcoming and map views
if ( is_post_type_archive(‘events-category-classes’) ) {
if (tribe_is_upcoming() or tribe_is_map() or tribe_is_photo()) return ‘Upcoming Classes’;
} elseif (is_post_type_archive(‘events-category-event’) ) {
if (tribe_is_upcoming() or tribe_is_map() or tribe_is_photo()) return ‘Upcoming Events’;
} else {
//In all other circumstances, leave the original title in place
return $title;
}
}Thanks for your help so far!
January 23, 2014 at 4:33 pm #96310Julie Kuehl
ParticipantI’m going to have one of our more dev-minded folks take a look at that and give you an assist. Hold tight!
— Julie
January 24, 2014 at 6:49 am #96421Barry
MemberFebruary 10, 2014 at 6:21 am #102589Barry
MemberIt’s been a while without any follow up so I’m going to guess you’re all sorted here and will close this thread. If you need any further help please don’t hesitate to create a new thread 🙂
-
AuthorPosts
- The topic ‘Changing the Calendar default title’ is closed to new replies.
