Home › Forums › Calendar Products › Community Events › Displaying events in list view makes calendar look out of date.
- This topic has 6 replies, 2 voices, and was last updated 11 years ago by
Barry.
-
AuthorPosts
-
March 24, 2015 at 11:33 pm #950680
Niall
ParticipantHi-
I am very annoyed that the list view doesn’t dynamically update to show the current month at the top of the list view, here: http://light2015.org.au/events/ It shows December 2014 at the top of the list becuase that’s when these events started – but some events (such as museum exhibitions) run for months. I want March 2015 (or whatever the current month is) at the top of the screen, regardless of when the event started.
Is there an easy way to achieve this? For example: should I be entering these type of events differently, or simply selection a differet option in settings?
The site is currently running the free version of Events Calendar and I have just installed community events. (We’re also considering upgrading to PRO.)
This situation is pretty dire. Hoping to get some help with this soon. Thanks!
March 25, 2015 at 9:03 am #950799Barry
MemberHi Niall,
I’m sorry this isn’t working for you – but it is actually by design.
I am very annoyed that the list view doesn’t dynamically update to show the current month at the top of the list view
It does update dynamically, it’s just that the criteria is not what you expect or want for your particular use case – however for many of our users this is exactly what they want. If an event is ongoing (ie, it started a few hours or even days ago but hasn’t yet finished) then they do not want it to disappear prematurely.
In general I think this is a reasonable default position – the whole idea is to promote events and draw attention to the fact that they are taking place (and presumably that’s true even in your scenario or you would simply delete the event).
Is there an easy way to achieve this? For example: should I be entering these type of events differently, or simply selection a differet option in settings?
You’d need to customize things a little to achieve this. Can I ask, is it only list view where you would wish to make such a change? Do you still wish for it to appear in month view?
March 25, 2015 at 10:39 pm #951029Niall
ParticipantHi –
I’m not sure I made the issue clear enough, sorry. We like the fact that the calendar does not prematurely delete events and would not want to change this.
Here’s an example of what we’re trying to resolve:
Let’s say an event runs from Feb 2015 – June 2015… during February the event appears under a heading that says “February 2015” in month view (awesome). However, once February is over – the calendar still displays the “February 2015” heading at the top of the month view, even though it could just remove the February heading and display the event under a “March 2015” header. The calendar starts to look out of date if many events that run over several months are included. Ie. in June 2015, the first heading of the month list view will still be February 2015.
Are you able to advise on how to resolve the issue now we’ve provided a bit more detail?
Thanks for your help.
March 26, 2015 at 10:03 am #951191Barry
MemberThanks for the explanation – I think I see what you’re driving at, here, but just to confirm:
- The actual result set should remain the same (ie, you don’t want to change the range of events that are included)
- Any events that started prior to the current month should be grouped under the current month heading (March 2015 at time of writing, for instance)
Is that an accurate summary?
March 26, 2015 at 5:42 pm #951340Niall
ParticipantHi Barry. Yes, that’s correct. 🙂
March 27, 2015 at 7:49 am #951453Barry
MemberDoes this snippet (you could add it to your theme’s functions.php file) achieve your aims?
function sp950680_modified_list_headers( $html ) { static $opened = false; // We're not interested in past event views if ( tribe_is_past() ) return $html; // Did the current event start today/later? if ( tribe_get_start_date( null, false, 'Y-m' ) > date_i18n( 'Y-m' ) ) { remove_filter( 'tribe_events_list_the_date_headers', 'sp950680_modified_list_headers' ); return $html; } // If we already opened and are still in the opening range, return nothing if ( $opened ) return ''; // Otherwise, provide a header covering all events starting in the current month or earlier $opened = true; return sprintf( "<span class='tribe-events-list-separator-month'><span>%s</span></span>", date_i18n( tribe_get_option( 'monthAndYearFormat', 'F Y' ) ) ); } add_filter( 'tribe_events_list_the_date_headers', 'sp950680_modified_list_headers' );April 13, 2015 at 7:48 am #955048Barry
MemberHi!
It’s been a while so I’m going to go ahead and close this topic.
- Need help with anything else? Go right ahead and post a new topic, one of the team will be only too happy to help
- Still need help with this issue and need to re-open it? Again, please simply create a new topic and link to this one to provide the team with some context
Thanks!
-
AuthorPosts
- The topic ‘Displaying events in list view makes calendar look out of date.’ is closed to new replies.
