Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter envieme

    (@envieme)

    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

    Plugin Author Envigeek Web Services

    (@envigeek)

    Hi, thank you for the bug report. We will check on this issue and revert to you soon.

    Thread Starter envieme

    (@envieme)

    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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Scoreboard sorting’ is closed to new replies.