I have created new post type (hotels) and taxonomies (localisation).
I want to loop my hotels ordering by count DESC of taxonomies. I want to sort my hotel by count of localisation (I mean order from more hotels in localisation to less hotels).
I try this :
$args = array( 'post_type' => 'hotels', 'posts_per_page' => -1, 'tax_query' => array( array( 'taxonomy' => 'taxonomy_localisation', 'field' => 'term_id', 'orderby' => 'count', 'order' => 'DESC', 'terms' => $localisation_child->term_id, ), ), );
Is it possible using WP_query args ?