WordPress.org

Ready to get started?Download WordPress

Forums

Sorting Posts by Rating in Category Pages (2 posts)

  1. enduro bikes
    Member
    Posted 1 year ago #

    Hi,
    I have tried nearly every rating plugin, installing them all one at a time and I have now uninstalled them all after spending the last day on it. All I want to do is have a simple post rating system and then have the posts that have the highest ratings show on top of the category pages. At the moment only the newest posts show up on top of the category like on this category page : http://bantayan.info/category/accommodation/

    I would really appreciate anyone helping with this as I have all but given up now.

  2. enduro bikes
    Member
    Posted 1 year ago #

    OK, I found a plugin that does seem to want to do what I want and it's called "kk_ratings". I installed the plugin and after looking up on the support blog I found this bit of code:

    Replace query_posts; with

    query_posts('meta_key=_kk_ratings_avg&orderby=meta_value&order=DESC');

    My theme only had:

    suffusion_query_posts; (shows the theme name first)

    So I added it like this:

    suffusion_query_posts('meta_key=_kk_ratings_avg&orderby=meta_value&order=DESC');

    but it does not sort the post on the category page by rating.

    So I then tried it without the "suffusion_" part like this:

    query_posts('meta_key=_kk_ratings_avg&orderby=meta_value&order=DESC');

    that does show the rated posts but ONLY the rated posts and not all the others. It also does not show the rating stars like it would normally on the posts in the category page.

    Any ideas please? I have left the plugin installed and you will see two of the posts have ratings on this page http://bantayan.info/category/accommodation/ (they are currently half way down the page, I want these rated ones to be at the top).

Topic Closed

This topic has been closed to new replies.

About this Topic