$meta_query = array();
$and = array('relation' => 'AND');
array_push($meta_query,$and);
// Create an empty array
$categories = array();
// Recup categories de séjour
$categories_raw = get_terms( array(
'taxonomy' => 'categorie-de-sejour',
'hide_empty' => false
) );
foreach($categories_raw as $category) {
// Get the top level categories
if ( $category->parent == 0 ) {
//$categories[$i] = "{'name' : $category->name, 'id' : $category->term_id, 'content' : []}";
$categories[$category->term_id] = array('name' => $category->name,'sub' => []);
// Get subcategories within the parent category only
foreach ($categories_raw as $subcategory) {
if ($subcategory->parent == $category->term_id) {
$categories[$category->term_id]['sub'][] = array('id' => $subcategory->term_id, 'name' => $subcategory->name, 'slug' => $subcategory->slug);
}
}
}
}
function list_filtre($id_field,$libelle){
$table_field = acf_get_fields($id_field);
for($i=0;$i
WEITERE INFORMATIONEN FINDEN SIE BEI ALLEN UNSEREN PARTNERN