Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Ricard Torres

    (@quicoto)

    You have to add an orderby value to your get_posts function arguments:

    ‘meta_key’ => $meta_key,
    ‘orderby’ => ‘meta_value_num’,

    meta_key can be _thumbs_rating_down or _thumbs_rating_up

    I’m afraid I can not code it for you, every theme is different.

    Here’s more information on how to retrieve posts: https://codex.wordpress.org/Template_Tags/get_posts

    Cheers.

    Thread Starter shounakgupte

    (@shounakgupte)

    yup.. thanks.

    that helps.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Sorting by upvotes’ is closed to new replies.