I have custom taxonomy registered for custom post type and pages with same value how can get posts when the checkbox is checked by taxonomy in Pges .
This To Get Terms in variable
$category = get_terms([
'taxonomy' => 'category',
'hide_empty' => false,
]);
$category = get_terms([
'taxonomy' => 'category',
'hide_empty' => false,
]);
$property_area = get_terms([
'taxonomy' => 'property_area',
'hide_empty' => false,
]);
$property_type = get_terms([
'taxonomy' => 'property_type',
'hide_empty' => false,
]);
WordPress query
$rent_properties = array(
'post_type' => 'properties',
'posts_per_page' => 20,
'post_status' => 'publish',
'paged' => $paged,
'tax_query' => array(
'relation'=>'AND',
array(
'taxonomy'=>'category',
'field' => 'field_id',
'terms' => $category,
),
array(
'taxonomy'=>'property_area',
'field' => 'fild_id',
'terms' =>$property_area,
),
array(
'taxonomy'=>'property_type',
'field' => 'slug',
'terms' => $property_type
)
)
);