This doesn;t get the list of top 10 scores sorted by meta_value in my WP install
$scoreboard = new WP_User_Query( array(
‘number’ => $top,
‘exclude’ => array( $exclude ),
‘orderby’ => ‘meta_value’,
‘order’ => ‘DESC’,
‘meta_key’ => ‘wp2048_score’,
‘meta_value’ => ‘0’,
‘meta_compare’ => ‘>’,
) );
what could be wrong? i tried using meta_value_num too for orderby but still won’t work
Hi, thank you for the bug report. We will check on this issue and revert to you soon.
Thanks for looking in. I am on wordpress 3.9. And have tried everything to make this wp_user_query work to return the scoreboard sorted by meta_value as an integer. But unable to make it happen. Probably replacing it with a SQL query can fix it?