Yeah ! It’s working well with both code 🙂
The only problem is here
$value = get_field(‘date_de_debut’);
I think that $value is always empty.
An other example if I use this:
$value = get_field('date_de_debut');
if (empty($value)) {
$query_array[‘meta_key’] = ‘date_de_debut’;
$query_array[‘orderby’] = ‘meta_value’;$
}
The order change and works well according to the meta_key ‘date_de_debut’