Sort by an ACF field in a tax_query

I do not find the solution which must surely be surely simple. (I’m new to WP) I have an ACF field named “partners_order”. I would like to sort it in ascending order (ASC) here’s what i tried <?php $terms = get_terms(‘type_partenaires’); usort($terms, function($a, $b) { return get_field(‘ordre_affichage’, $a) – get_field(‘ordre_affichage’, $b); }); foreach ( $terms…

Details