Home › Forums › Calendar Products › Events Calendar PRO › Change Event Category page title
- This topic has 8 replies, 4 voices, and was last updated 9 years, 4 months ago by
Geoffrey.
-
AuthorPosts
-
December 9, 2016 at 2:00 pm #1204174
Geoffrey
ParticipantThe 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?
December 12, 2016 at 7:44 pm #1205032Geoff B.
MemberGood 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:
- https://theeventscalendar.com/knowledgebase/configuring-the-events-calendar-with-constants/#tribe_modify_global_title
- https://theeventscalendar.com/support/forums/topic/changing-event-page-title-archives/
Let me know if that helps.
Have a great day!
Geoff B.
December 15, 2016 at 7:01 am #1206405Geoffrey
ParticipantThank 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.
December 15, 2016 at 7:41 am #1206425Geoffrey
ParticipantJust 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.
December 15, 2016 at 11:11 pm #1206933Geoff B.
MemberHey 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.
December 16, 2016 at 6:03 am #1207018Geoffrey
ParticipantThe 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.
December 16, 2016 at 1:05 pm #1207196Geoff B.
MemberHey 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.
January 7, 2017 at 8:35 am #1214721Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Change Event Category page title’ is closed to new replies.
