Home › Forums › Calendar Products › Events Calendar PRO › Sorting event photo view by start time
- This topic has 5 replies, 2 voices, and was last updated 7 years, 9 months ago by
lamanufacture.
-
AuthorPosts
-
June 21, 2018 at 2:41 am #1558015
lamanufacture
ParticipantHi there,
I’m looking for a way to sort my events by start time instead of start date and then time.
I’ve tried to integrate this snippet I’ve found on your forum and modified with ‘start-time’ in my function.php but whitout results.
add_filter( 'pre_get_posts', 'tribe_change_event_order', 99 ); function tribe_change_event_order( $query ) { if ( tribe_is_past() || tribe_is_upcoming() || tribe_is_photo() ) { $query->set( 'orderby', 'start-time' ); $query->set( 'order', 'ASC' ); } return $query; }What did I do wrong ?
June 26, 2018 at 4:22 am #1561491Jennifer
KeymasterHello,
Thanks for reaching out!
Customizations like this are outside the scope of support that we are able to provide here in the forums, but I will be happy to try to point you in the right direction.
First, can you send me a link to the post where you found this snippet? When using custom fields like the event start time, you will need to call them differently (see this article in the Codex). The start time is stored in the field “_EventStartDate”.
Thanks,
Jennifer
July 3, 2018 at 2:10 am #1566539lamanufacture
ParticipantHi Jennifer,
Thanks for your reply and your help.
Here the post : https://theeventscalendar.com/support/forums/topic/ordering-events-by-title-query-not-working/
July 3, 2018 at 2:49 am #1566547lamanufacture
ParticipantI’ve found the “_EventStartDate” function but how to target only the time in order to query my post by start ing time only ?
July 4, 2018 at 5:58 am #1567494lamanufacture
ParticipantHey Jennifer,
I beg your help, I’m not a dev, I don’t have any budget for this but we really need our events to be sorted outby time instead by date …
It’s already sad enough your plugin don’t propose it with a basic option (I know you wil send me your link to propose the feature for later release… :D) but don’t you have a snippet already crafted for it ? Or even the beginning of a solution ?
We’ll be very reconnizing.
July 5, 2018 at 9:20 am #1568309Jennifer
KeymasterHello,
You can indeed post this as a feature request! I don’t see any existing snippets to sort by the time (without the date). If you’d prefer not to tackle this customization on your own, we may be able to assist you further. What I can do is flag this with the team and – although we can’t make any promises – if we have time and space to come back and help, we’ll be happy to do so. Please let us know if you’d like to go this route so that you can be added to this queue.
Thanks,
Jennifer
July 27, 2018 at 9:35 am #1584784Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Sorting event photo view by start time’ is closed to new replies.
