Order of events through Day view

Home Forums Calendar Products Events Calendar PRO Order of events through Day view

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #233344
    frugalphillymom
    Participant

    Hi, I have the default as Day View on my events calendar. I just want to know why it’s displaying the later event first. For instance the first event is for today start time 7:30pm and the last event is a start time of 6:30am of the same day. It also still displays the event after it has passed. Hope you can help.

    Thanks!

    #233726
    Barry
    Member

    Hi – sorry you’re experiencing this. I think it may be a known bug you’re up against, unfortunately. Can you try working around it by adding the following short snippet to your theme’s functions.php file?

    add_action( 'pre_get_posts', 'fix_day_view_order', 100 );
    function fix_day_view_order( WP_Query $query ) {
    	if ( 'day' !== $query->get( 'eventDisplay' ) ) return;
    	$query->set( 'order', 'ASC' );
    }
    #234152
    frugalphillymom
    Participant

    Thank you! That helped with the order of the events and it was an easy fix. However it is still displaying events that have passed.

    #235499
    Barry
    Member

    So you mean if someone views day view for today, it’s 2pm and an event that completed at 11am still displays?

    If so, that is expected behaviour (as it simply lists all event taking place on the day in question). Might the upcoming events (list) view better suit your needs here? It doesn’t include any events that have passed, unless of course the user consciously decides to navigate backwards.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Order of events through Day view’ is closed to new replies.