Support

Home Forums Event Espresso Premium Changing default filter and sort for Admin > Event view

Changing default filter and sort for Admin > Event view

Posted: January 20, 2018 at 12:24 pm

Viewing 1 reply thread


charlie francus

January 20, 2018 at 12:24 pm

Greetings

We just upgraded to EE4 and one of the administrators has an issue with the default event list view. She would like to have only ‘upcoming’ events listed and have them sorted by start date in chronological order (first event at the top). By default, getting tot his view requires a few clicks and I’ve been told this is not acceptable. To be fair, we have hundreds of events spanning back years and years – so to see ALL of them by default is cumbersome.

I did the filtering and copy/pasted the URL, which works – but I suspect won’t be satisfactory.

Is there a way to set this sort/filter by default for when an admin clicks into events?

Thanks!
Charlie


Josh

  • Support Staff

January 24, 2018 at 12:43 pm

Hi Charlie,

I’m not sure what you mean by:

To be fair, we have hundreds of events spanning back years and years – so to see ALL of them by default is cumbersome.

You shouldn’t be seeing all of them by default because of paging.

In any case, add this code to a custom functions plugin to change that link:

add_action ( 'admin_menu', 'ee_filter_ee_events_orderyby_datetime', 99 );
function ee_filter_ee_events_orderyby_datetime() {
    // call global submenu item
    global $submenu;
    // edit main link for events
    $submenu['espresso_events'][0][2] = 'admin.php?page=espresso_events&orderby=Datetime.DTT_EVT_start&order=asc&active_status=upcoming';
}
Viewing 1 reply thread

The support post ‘Changing default filter and sort for Admin > Event view’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso