Change Event Category page title

Home Forums Calendar Products Events Calendar PRO Change Event Category page title

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1204174
    Geoffrey
    Participant

    The site I am working on uses event categories as sub-pages for displaying events. The page title is displaying as “Archive” and I would like to change this default text to match the category text. How can I do this?

    #1205032
    Geoff B.
    Member

    Good evening Geoffrey and welcome to the Events Calendar Support forum!

    Thank you for reaching out to us.
    I would love to help you with this topic.

    What is going on is that our plugin uses some of WordPress’ Archives mechanics.
    With some themes, that results in the page title being switched to Archives.

    Here are a couple of potential solutions to this issue:

    1. https://theeventscalendar.com/knowledgebase/configuring-the-events-calendar-with-constants/#tribe_modify_global_title
    2. https://theeventscalendar.com/support/forums/topic/changing-event-page-title-archives/

    Let me know if that helps.

    Have a great day!

    Geoff B.

    #1206405
    Geoffrey
    Participant

    Thank you Geoff. These did not resolve my issue.

    I would like to try some custom code in my child theme’s functions.php to alter the theme’s code but first I need to know if there is a global identifier for detecting an Events Calendar category page? Something I can plug into an if statement.

    I’m going to try to do something along the lines of:

    
    if is_category() {   // where is_category would be the Event Calender identifier
    
    // code to alter h1 entry-title to display the category name instead of "Archive"
     
    }
    

    …or something along those lines.

    #1206425
    Geoffrey
    Participant

    Just to clarify, I don’t want to add a category name to the is_category() function because there are already many and the client will be potentially adding categories on the fly, which would not be reflected in the code. Also, if they use other categories outside of the Calendar, I don’t want this code affecting those.

    So I need a global Event Calendar identifier to replace the is_category() so any event categories added by the client in the future will be included. Does something like “is_event_calendar_category()” exist?

    • This reply was modified 9 years, 5 months ago by Geoffrey.
    #1206933
    Geoff B.
    Member

    Hey Geoffrey,

    Thank you for writing back.

    I see what you mean. The function you would probably want to use is https://theeventscalendar.com/function/tribe_is_event_category/

    That being said, I am still pretty sure the issue comes from your theme’s archive.php

    To test this out, you could temporarily switch to a default WordPress theme such as twenty-sixteen and look at the page title.

    Let me know if that helps.

    Have a great day!

    Geoff B.

     

    #1207018
    Geoffrey
    Participant

    The archive.php simply calls in the header function. I’ve gone through all the template pages in the theme and isolated the title to the header.php. This is where I will have to insert my custom code. To my knowledge, the theme does not provide any hooks or filters. The event page actually uses the page.php template (even though it’s a category) which also calls in the header function.

    Thanks for the tribe function, I will go check it out and let you know how it works out.

    #1207196
    Geoff B.
    Member

    Hey Geoffrey,

    Thank you for writing back.

    Keep me posted on how that goes with your specific theme.

    As a side note, some users have managed to bypass this issue by simply changing the “Events Template” option under Events -> Settings -> Display.

    You might want to give this a shot.

    Have a good weekend,

    Geoff B.

    #1214721
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Change Event Category page title’ is closed to new replies.