Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter kingharrison

    (@kingharrison)

    Figured out what is happening. The query to display the results is wrong. It is ordering it via Alpha I believe, not doing it via numeric count. My low ranking item had a 945 and was at the top. When I reorganized it to be 1000 (still the lowest score) it was then at the bottom. When I put it as 999 it went back to the top again. So the query needs to be adjusted.

    Thread Starter kingharrison

    (@kingharrison)

    I was able to fix it by adding this to this-or-that.php

    $thisthat_query = new WP_Query(array(
    ‘post_type’ => $posttype,
    ‘meta_key’ => ‘thisorthat_rating’,
    ‘meta_type’ => ‘NUMERIC’,
    ‘orderby’ => ‘thisorthat_rating’,
    ‘category_name’ => ”,
    ‘posts_per_page’ => $length,
    $taxonomy => $category

    ));

    Bolded is what I added. Fixed.

    kingharrison, you just saved my butt!

    Thank you. Great fix.

    Thx kingharrison plugin should be update for this

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘The order of results is off’ is closed to new replies.