hello, your plugin is very perfect. I use it in my site ( pixeltv.it ), I use in review, for all specific, for valutation, and for google structured data. Its all perfect.
Now I would like to create a dynamic ranking query, this code in your site is god for select different field:
$posts = get_posts(array(
'numberposts' => -1,
'post_type' => 'post',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'color',
'value' => array('red', 'orange'),
'compare' => 'IN',
),
),
));
but I would like this code to list the results in order of the custom field “range” with numbering from 0 to 100 (descending order)
for the numbering I used the custom field “range” with the name “total_review”. it’s possible ?
thanks for support
$posts = get_posts(array(
'numberposts' => -1,
'post_type' => 'post',
'meta_query' => array(
'relation' => 'AND',
'range_clause' => array(
'key' => 'range field name',
'compare' => 'EXISTS',
),
),
'orderby' => array('range_clause' => 'DESC')
));