Query by meta_key and order by meta_value_num return orderby date

The problem in your code is ‘meta_query’ code is write insde array of array

$args = array(
                'post_status' => 'publish',
                'post_type' => 'participant',
                'order' => 'DESC',
                'meta_key' => 'participant_partage_class',
                'orderby' => 'meta_value_num,
                'meta_query' => array(array(
                             'key' => 'participant_partage_class',
                             'type' => 'SIGNED',
                             'compare' => '>',
                        )),
                'posts_per_page' => '8',
                'paged' => $paged
            );
$query = new WP_Query($args);

http://codex.wordpress.org/Class_Reference/WP_Query

you can check here how to use ‘meta_query’ in wp_query

Leave a Comment

tech