Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Issue with result group by meta key › Reply To: Issue with result group by meta key
April 4, 2019 at 1:46 pm
#22017
Keymaster
Hi,
I managed to find a possible solution, but I had to make direct changes to the plugin files. I will include these changes in the upcoming release, please do not re-istall or update the plugin until the 4.15.1 release.
I have also added this custom code to the functions.php file in the child theme directory:
add_filter('asp_query_args', 'asp_reset_date_filter');
function asp_reset_date_filter($args) {
if ( isset($_POST['autop']) ) {
foreach ( $args['post_meta_filter'] as $k => $v ) {
if ( $v['key'] == '_event_start' ) {
unset($args['post_meta_filter'][$k]);
}
}
}
return $args;
}
This negates the filter, when the page is loaded with auto populate. Please keep this custom code there.