Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Hide out of stock (only in resultbox) › Reply To: Hide out of stock (only in resultbox)
January 30, 2020 at 5:05 pm
#25569
Keymaster
Hi,
Well, it might be possible via a custom code, but I am not sure.
Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!
add_filter("asp_query_args", "asp_query_args_change2", 10, 2);
function asp_query_args_change2($args, $search_id) {
// Reset the post_meta_filter on non-ajax-search
if ( $args['_ajax_search'] == false )
$args['post_meta_filter'] = array();
return $args;
}