You are looking for this, most probably. Note: meta query support a compare method what is ‘IN’, which means any of the value. Like this –
if( isset($_GET['H_property_type']) ){
// you don't need relation for this
// if(count($_GET['H_property_type']) > 1){
// $args['meta_query']['relation'] = 'OR';
// }
// if $_GET['H_property_type'] is an array
// foreach ($_GET['H_property_type'] as $type) {
if( isset($_GET['H_property_type']) && is_array($_GET['H_property_type']) ){
$args['meta_query'] = array(
'key' => 'H_property_type',
'value' => array_map( 'trim', $_GET['H_property_type'] ),
'compare' => 'IN'
);
}
// }
}
Commented codes are not necessary for the query. Thanks.