Order 2 meta_queries differently in WP_Query?
Order 2 meta_queries differently in WP_Query?
Order 2 meta_queries differently in WP_Query?
You use ‘orderby’ => ‘publish_date’, but there is no such value for this parameter available. It should be: ‘orderby’ => ‘date’,
How to get_comments() ordered by date and parent?
Query Order By Number Variable From API
meta_query orderby sort multiple keys
How to override WooCommerce Order Item Meta with data from Cart?
Order Element By Custom Field in WordPress
You have to use “orderby” => “meta_value_num” and set a “meta_query” at the same time. Then choose the “meta_key” you want to order by. Try: $query = new WP_Query( array( ‘post_type’ => ‘some_cpt’, ‘posts_per_page’ => – 1, ‘meta_query’ => array( array( ‘key’ => ‘active’, ‘value’ => ‘1’, ‘compare’ => ‘=’, ) ), ‘meta_key’ => ‘ranking’, … Read more
Sorting Tag Cloud by Popularity
‘orderby’ => ‘post__in’, ‘post__in’ => array(5,6,3,8), You need ACF to pass the ID’s in order but that should do it.