Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › AjaxSearchPro Events Manager. Double location towns › Reply To: AjaxSearchPro Events Manager. Double location towns
June 7, 2019 at 12:44 pm
#23061
Keymaster
Hi,
Well, if I understand correctly, you have duplicates within the location filter.
That code looks perfect, maybe filtering the $location_ids though an array_unique function will do the trick. So try replacing this line:
$locations = EM_Locations::get( array('location'=>$location_ids) );
with:
$locations = EM_Locations::get( array('location'=>array_unique($location_ids)) );
It may do the trick.