Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › ERROR AjaxSearchPro: include post_user_filter not working › Reply To: ERROR AjaxSearchPro: include post_user_filter not working
November 2, 2020 at 9:21 am
#30087
Keymaster
Hi,
Thanks for the details!
The issue is not escaping, the plugin does not check for names, but user IDs. The issue is within the custom code, as it basically removes the ‘include’ sub-array argument, which causes an empty query part.
Try using this method instead to push the additional user ID there:
$args['post_user_filter']['exclude'][] = $awuser[0]->data->id;
$args['post_user_filter']['exclude'] = array_unique($args['post_user_filter']['exclude']);