Home › Forums › Calendar Products › Events Calendar PRO › Changing Event Order in the Day View
- This topic has 4 replies, 3 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
November 27, 2013 at 7:01 am #78870BenParticipant
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!
November 28, 2013 at 8:08 am #79147BarryMemberHi 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!
December 1, 2013 at 7:51 am #79453BenParticipantThanks 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
December 2, 2013 at 8:04 am #79537BarryMemberIt 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 🙂
July 7, 2015 at 6:30 am #982459Support DroidKeymasterThis 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. -
AuthorPosts
- The topic ‘Changing Event Order in the Day View’ is closed to new replies.