Changing Event Order in the Day View

Home Forums Calendar Products Events Calendar PRO Changing Event Order in the Day View

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #78870
    Ben
    Participant

    Is it possible to change the order of events on the Day view? (frontend obviously)

    The default order seems a little all over the place to me. Example: http://www.welovebrighton.com/events/today/

    That list includes reoccurring events and events that start before ‘today’ and end after ‘today’. Also events with or without a start/end time.

    What I’m trying to get is much simpler. We just need the ‘all day’ events coming first followed by events with start times (in order of their start time). Is that possible?

    I’m a developer so happy to go in changing things. Hopefully in my child theme’s /tribe-events folder. Cheers!

    #79147
    Barry
    Member

    Hi Ben,

    There are at least two ways you could tackle this – one by modifying the query/queries used to obtain the list of events for day view and clamp things down by adding additional clauses or modifying existing ones: this would have the advantage of more easily facilitating pagination.

    An alternative could be to modify the day view templates (see our Themer’s Guide for an overview of this process) and selectively show or hide different events, or even trap them and re-order them before displaying them.

    Good luck!

    #79453
    Ben
    Participant

    Thanks Barry. I like the sound of your first suggestion although it sounds like that will require core changes to the plugin, which I like less. Where in the plugin is the query/queries constructed? I can’t find it :s

    Ta

    #79537
    Barry
    Member

    It needn’t require changes to core code: our own event queries are themselves based on WordPress’s own query mechanism and simply makes use of filters to modify it. By extension, you too could use the same group of filters and make additional tweaks.

    You can get an idea of what’s happening in:

    the-events-calendar/lib/tribe-event-query.class.php

    Hope that helps! I’ll go ahead and close this thread now as we can’t help any further with customizations like this one, but we do wish you luck 🙂

    #982459
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Changing Event Order in the Day View’ is closed to new replies.