Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @lynxlux

    Add this in the functions.php at theme side,

    //code for upcoming event tab
    add_filter("wpem_single_organizer_upcoming_event_listing_query_args","YOUR_THEME_SLUG_change_organizer_listing_order_upcoming");
    function YOUR_THEME_SLUG_change_organizer_listing_order_upcoming($args){
    //$args['orderby'] = 'YOUR CUSTOM ORDER';
    //$args['order'] = 'ASC/DESC';
    return $args;
    }
    //code for past event tab
    add_filter("wpem_single_organizer_current_event_listing_query_args","YOUR_THEME_SLUG_change_organizer_listing_order_current");
    function YOUR_THEME_SLUG_change_organizer_listing_order_current($args){
    //$args['orderby'] = 'YOUR CUSTOM ORDER';
    //$args['order'] = 'ASC/DESC';
    return $args;
    }
    //current tab 
    
    add_filter("wpem_single_organizer_past_event_listing_query_args","YOUR_THEME_SLUG_change_organizer_listing_order_past");
    function YOUR_THEME_SLUG_change_organizer_listing_order_past($args){
    //$args['orderby'] = 'YOUR CUSTOM ORDER';
    //$args['order'] = 'ASC/DESC';
    return $args;
    }

    Regards,
    Priya

    Thread Starter lynxlux

    (@lynxlux)

    Hi,

    thank you for your quick response!

    unfortunately it doesn’t work with the event start date.
    When I put “name” or “date” in your code (“YOUR CUSTOM ORDER”) it works fine.

    I tried “start_date” “event_start_date” and “_event_start_date”…

    Hi @lynxlux

    Try this:

    //code for upcoming event tab
    function theme_name_custom_orderby_query_args( $query_args ) {
        $query_args[ 'meta_key' ] = '_event_start_date'; //here you can change your meta key
        return $query_args;
    }
     
    add_filter( 'wpem_single_organizer_upcoming_event_listing_query_args', 'theme_name_custom_orderby_query_args', 99 );
    • This reply was modified 2 years, 6 months ago by Priya Goenka.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘upcoming event order (on organizer page)’ is closed to new replies.