Home Forums Event Espresso Premium Add new filter in attendees searcher

Add new filter in attendees searcher

Posted: January 31, 2019 at 6:59 am


January 31, 2019 at 6:59 am

I’ve added 2 filters to the attendees searcher in the page ‘espresso_registrations’ and they work perfectly.

This is the code I’ve used to add the filters.


function my_custom_search_field_reg( $where, $request ) {
if (isset($request['s'])) {
$search_string = '%' . sanitize_text_field($request['s']) . '%';
$where['OR*search_conditions']['Answer.ANS_value'] = array('LIKE', $search_string);
$where['OR*search_conditions']['Answer.ANS_value'] = array('LIKE', $search_string);
$where['OR*search_conditions']['Attendee.ATT_phone'] = array('LIKE', $search_string); }
return $where;

I would like to filter attendees by their promotion codes. I’ve looked in the database and they are in the field ‘LIN_desc’ of the ‘_line_item’ table and in the field ‘PRO_code’ of the ‘_promotion’ table.

Is it possible to add this field to the searcher filters? How could I do it?

Thank you beforehand


  • Support Staff

January 31, 2019 at 12:29 pm


You can add this to your list you have there:

$where['OR*search_conditions']['Transaction.Line_Item.LIN_desc'] = array('LIKE', $search_string);


February 1, 2019 at 1:24 am

Lots of thanks!

The support post ‘Add new filter in attendees searcher’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: closed

Updated by  guiapenin 1 year, 5 months ago ago

Topic Tags


This topic is: resolved
Do NOT follow this link or you will be banned from the site!