Home › Forums › Calendar Products › Events Calendar PRO › List and Map view – Page Title problems with 3.8 release
- This topic has 11 replies, 2 voices, and was last updated 9 years, 7 months ago by Brian.
-
AuthorPosts
-
October 2, 2014 at 12:29 pm #783473irishrunner16Participant
Just updated to 3.8 and found some problems with the “Changed page titles to show date range of currently displayed events when a date is selected in the tribe bar”.
1. The title appears to be based on the end date of the event. This is a problem because if a multi-day event is at the top of the list, the title will read a later date first and then an earlier date after that (which just doesn’t make sense to the user). For example, if the first event on the page of search results is a single event that occurs October 4 through November 5 (or is a recurring event), and all other events in that page of search results occur on October 4, the page title/header will read “Events for Wednesday, November 5 – Saturday, October 4”
2. Likewise, if all events in the search results are for the same date, it doesn’t make sense to have the title repeat itself: “Events for Saturday, October 4 – Saturday, October 4”With that said, how can I change this so that the title on List and Map views continues to display “Upcoming Events” when a date is selected in the Tribe Bar?
Thanks,
SeanOctober 2, 2014 at 5:36 pm #783907irishrunner16ParticipantAlso, for single event pages, the page title is now “Upcoming Events [Event Title]”. Is that supposed to be the format? “Upcoming Events” doesn’t seem to make sense there (although including the event city and state might for SEO purposes), but that might just be me 🙂
October 3, 2014 at 12:25 pm #785713BrianKeymasterHello,
I took a look at what you mean and I could see that is confusing I will have to bring this up with the team to see how we can make that better.
In the mean time I came up with this filter to change the title to Upcoming Events on the first page or future events. Then on the past events it filters to say Past Events.
https://gist.github.com/jesseeproductions/91751356639fe24bfd08
Also, for single event pages, the page title is now “Upcoming Events [Event Title]“. Is that supposed to be the format? “Upcoming Events” doesn’t seem to make sense there (although including the event city and state might for SEO purposes), but that might just be me 🙂
Yep that is the format.
Let me know if that filter works for you.
Thanks
October 3, 2014 at 2:04 pm #785879irishrunner16ParticipantHi Brian,
Thank you very much for that filter. It works great and accomplishes exactly what I was looking for on the List and Map views. The only problem I can see is that it also changes the Day and Month page titles to “Upcoming Events” instead of “Events for Friday October 3, 2014” and “Events for October 2014” respectively.
Is there a way I can change the page titles of List and Map view while also retaining the default (dynamic) titles for Day and Month views?
Thanks again,
SeanOctober 3, 2014 at 2:33 pm #785938BrianKeymasterYou could try adding these two conditionals to the filter:
tribe_is_map()
and
tribe_is_list_view()
That should make it only work on the list view and the map view.
Let me know if that works.
Thanks
October 3, 2014 at 2:41 pm #785947BrianKeymasterI updated the Gist as well with that coding, but I have not tested if that would indeed work.
October 3, 2014 at 3:38 pm #786015irishrunner16ParticipantThanks Brian. That looked like it should work as my calendar home page loaded fine, but it unfortunately leads to a white screen of death as soon as interacting with the calendar (changing view, entering search criteria, etc).
October 6, 2014 at 6:38 am #791215BrianKeymasterI fixed it, there was a missing { after the new is list or is month check.
I have created a ticket to address this issue in a future release and make it less confusing when searching by a date.
As for the filter, the function is working now and this is about all we can provide for support on this customization in the forum. So I will leave you to modifying the function if you would like it to do more for you.
Thanks
October 6, 2014 at 9:01 am #791615irishrunner16ParticipantThat did get the filter working. Thanks Brian, really appreciate it.
Lastly, could you confirm if the single event page titles are formatted by public/template-tags/loop.php? I see the views are setup there (lines 103-160) but I didn’t see a conditional tag for the Single Event pages in there or in the docs (I want to use that to create my own function to customize the single event page titles). Thanks again.
October 6, 2014 at 4:12 pm #792469BrianKeymasterIf you look in the this file on line 296 there is the function (title_tag) with a filter you can use to change the title.
the-events-calender/lib/tribe-template-factory.class.php
October 6, 2014 at 5:34 pm #792678irishrunner16ParticipantThank you!
October 7, 2014 at 7:10 am #794047BrianKeymasterOk great, since the original question is answered I am going to close this ticket. If you have questions about the single-events title filter please create a new ticket or as you know the drill 🙂 please create another ticket for any other issues or questions.
Thanks!
-
AuthorPosts
- The topic ‘List and Map view – Page Title problems with 3.8 release’ is closed to new replies.