Changing the Calendar default title

Home Forums Calendar Products Events Calendar PRO Changing the Calendar default title

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #93483
    yohogdes
    Participant

    Hi 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!

    #93688
    Julie Kuehl
    Participant

    Hi 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

    #95939
    yohogdes
    Participant

    Hi 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!

    #96310
    Julie Kuehl
    Participant

    I’m going to have one of our more dev-minded folks take a look at that and give you an assist. Hold tight!

    — Julie

    #96421
    Barry
    Member

    Hi @yohogdes,

    Something like this might get you a little closer. There are a few other ways you could approach it but this should give you a good starting point.

    Does that help?

    #102589
    Barry
    Member

    It’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 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Changing the Calendar default title’ is closed to new replies.