Support

Home Forums Event Espresso Premium Admin > Events view change filters

Admin > Events view change filters

Posted: February 20, 2018 at 8:13 am

Viewing 5 reply threads


jacl

February 20, 2018 at 8:13 am

Hi
I found your solution Josh to changing the default events listing filter in admin view

https://eventespresso.com/topic/changing-default-filter-and-sort-for-admin-event-view/

That works but our client has published (active & upcoming) and private (inactive) events so would love to be able to see these three via one filter but still hiding EXPIRED events.

Any way to active this combination? eg show upcoming/active/inactive all at once but not expired

thanks so much for any help
Jonathan


Josh

  • Support Staff

February 21, 2018 at 12:46 pm

Hi Jonathan,

You’ll actually use this instead:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/admin/jf_ee_change_event_list_default_query_params.php


jacl

February 21, 2018 at 12:51 pm

Superb. thanks so much Josh… really helpful ๐Ÿ™‚


jacl

March 1, 2018 at 11:40 am

Hi Josh
That works great but a side effect is you cant then see anything in Trash or drafts as neither of those filters use the “active_status” query parameter.

My client has a HOLD file event set to private with a past date and she couldn’t find it once i activated this extra filter. To get around that I’ve told them to have that event set to say 5 years in future and still private so nobody can see it so that is sorted but would be nice to be able to see trash and draft items….

Anyway to add an extra check so if status=draft or status=trash this filter is not applied?

Thanks ๐Ÿ™‚

Jonathan


Josh

  • Support Staff

March 2, 2018 at 12:54 pm

Hi Jonathan,

You can add a conditional check for those too:

e.g. change
if ( ! array_key_exists( 'active_status', $req_data ) ) {
to
if ( ! array_key_exists( 'active_status', $req_data ) && ! array_key_exists( 'status', $req_data ) ) {


jacl

March 2, 2018 at 5:22 pm

Perfect thank you Josh Ill try that

Viewing 5 reply threads

The support post ‘Admin > Events view change filters’ 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