Change sort order of events

Home Forums Calendar Products Events Calendar PRO Change sort order of events

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1423062
    agrabemeyer
    Participant

    I would like items to sort alphabetically by day and not chronologically if possible. How do I change this?

    #1424335
    Brendan
    Keymaster

    Hello Pam and welcome back ?

    Can you copy/paste the following snippet and replace the code you provided in your functions.php file and let me know if events are sorting alphabetically in photo view. Please test the code using the default WP theme and only our plugins activated.

    Let me know if it helps and thanks for choosing PRO!


    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', 'title' );
    $query->set( 'order', 'ASC' );
    }
    return $query;
    }

    #1433915
    agrabemeyer
    Participant

    I don’t see any of your code in my functions.php file. Where do I need to insert it please?

    -Andi

    • This reply was modified 6 years, 2 months ago by agrabemeyer.
    #1435251
    agrabemeyer
    Participant

    I just copied and pasted the code you gave and it did not work. Please advise.

    #1437703
    Brendan
    Keymaster

    Hi there,

    That is our snippet for sorting alphabetically. You can custom development an option but it would require custom coding and recreating some of our templates to accomplish this.

    If you only need to change it for the list view, the template override approach is ok. Most probably the template override is not working at all. Please check that the override is in the correct path, it should be at ‘wp-content/[your_theme]/tribe-events/list/content.php’. If you are still not sure about this process, please check Themer’s Guide.

    Customizations are not supported so you would need to find a developer to accomplish this.

    Thanks,

    Brendan

    #1456950
    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 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Change sort order of events’ is closed to new replies.