List and Map view – Page Title problems with 3.8 release

Home Forums Calendar Products Events Calendar PRO List and Map view – Page Title problems with 3.8 release

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #783473
    irishrunner16
    Participant

    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,
    Sean

    #783907
    irishrunner16
    Participant

    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 🙂

    #785713
    Brian
    Keymaster

    Hello,

    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

    #785879
    irishrunner16
    Participant

    Hi 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,
    Sean

    #785938
    Brian
    Keymaster

    You 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

    #785947
    Brian
    Keymaster

    I updated the Gist as well with that coding, but I have not tested if that would indeed work.

    #786015
    irishrunner16
    Participant

    Thanks 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).

    #791215
    Brian
    Keymaster

    I 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

    #791615
    irishrunner16
    Participant

    That 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.

    #792469
    Brian
    Keymaster

    If 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

    #792678
    irishrunner16
    Participant

    Thank you!

    #794047
    Brian
    Keymaster

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

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘List and Map view – Page Title problems with 3.8 release’ is closed to new replies.