Sorting event photo view by start time

Home Forums Calendar Products Events Calendar PRO Sorting event photo view by start time

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1558015
    lamanufacture
    Participant

    Hi 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 ?

    #1561491
    Jennifer
    Keymaster

    Hello,

    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

    #1566539
    lamanufacture
    Participant

    Hi Jennifer,

    Thanks for your reply and your help.

    Here the post : https://theeventscalendar.com/support/forums/topic/ordering-events-by-title-query-not-working/

    #1566547
    lamanufacture
    Participant

    I’ve found the “_EventStartDate” function but how to target only the time in order to query my post by start ing time only ?

    #1567494
    lamanufacture
    Participant

    Hey 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.

    #1568309
    Jennifer
    Keymaster

    Hello,

    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

    #1584784
    Support Droid
    Keymaster

    Hey 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

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Sorting event photo view by start time’ is closed to new replies.