working fine in version Versión 7.1.2
not working in Version 7.2.0
/*
multiple directorist/templates/search-form/fields/category.php
add in_cat[] y multiple al select
directorist/includes/helper-functions.php linea 7494
para select multiple
if(is_array($term_id)){
$selected = in_array($term->term_id, $term_id) ? "selected" : '';
}else{
$selected = ($term_id == $term->term_id) ? "selected" : '';
}
//$selected = ($term_id == $term->term_id) ? "selected" : '';
*/
add_filter( 'atbdp_listing_search_query_argument', function( $args ){
if ( ! empty( $_GET['in_cat'] ) ) {
$tax_queries = array();
$ids = $_GET['in_cat'];
$categorias = array_map( 'intval', $ids );
$tax_queries[] = array(
'relation' => 'OR',
'post_type' => 'at_biz_dir',
'orderby' => 'title',
'order' => $sort_ORD,
'tax_query' => array(
'taxonomy' => ATBDP_CATEGORY,
'field' => 'term_id',
//'terms' => array(3,7),
'terms' => $categorias,
'operator'=> 'IN'
));
if ( count( $tax_queries ) ) {
$args['tax_query'] = array_merge( array( 'relation' => 'AND' ), $tax_queries );
}
$args['paged'] = max( get_query_var( 'paged' ), 1 );
}
//echo get_query_var( 'paged' );
//$args = $args_search_posts_meta;
return $args;
});