WordPress.org

Ready to get started?Download WordPress

Plugin Directory

WP-PostRatings

Adds an AJAX rating system for your WordPress blog's post/page.

How To Display Comment Author Ratings?

  1. Open wp-content/plugins/wp-postratings/wp-postratings.php
  2. Find: //add_filter('comment_text', 'comment_author_ratings_filter');
  3. Replace: add_filter('comment_text', 'comment_author_ratings_filter');

How To use PNG images instead of GIF images

  1. Open wp-content/plugins/wp-postratings/wp-postratings.php
  2. Find:
define('RATINGS_IMG_EXT', 'gif');
//define('RATINGS_IMG_EXT', 'png');
  1. Replace:
//define('RATINGS_IMG_EXT', 'gif');
define('RATINGS_IMG_EXT', 'png');

How Does WP-PostRatings Load CSS?

  • WP-PostRatings will load postratings-css.css from your theme's directory if it exists.
  • If it doesn't exists, it will just load the default 'postratings-css.css' that comes with WP-PostRatings.
  • This will allow you to upgrade WP-PostRatings without worrying about overwriting your ratings styles that you have created.

How To Use Ratings Stats With Widgets?

  1. Go to WP-Admin -> Appearance -> Widgets
  2. The widget name is Ratings.

How To Use Ratings Stats Outside WP Loop?

To Display Lowest Rated Post

  • Use:
<?php if (function_exists('get_lowest_rated')): ?>
    <ul>
        <?php get_lowest_rated(); ?>
    </ul>
<?php endif; ?>
  • Default: get_lowest_rated('both', 0, 10)
  • The value 'both' will display both the lowest rated posts and pages.
  • If you want to display the lowest rated posts only, replace 'both' with 'post'.
  • If you want to display the lowest rated pages only, replace 'both' with 'page'.
  • The value 0 refers to the minimum votes required before the post get shown.
  • The value 10 will display only the top 10 lowest rated posts/pages.

To Display Lowest Rated Post By Tag

  • Use:
<?php if (function_exists('get_lowest_rated_tag')): ?>
    <ul>
        <?php get_lowest_rated_tag(TAG_ID); ?>
    </ul>
<?php endif; ?>
  • Default: get_lowest_rated_tag(TAG_ID, 'both', 0, 10)
  • Replace TAG_ID will your tag ID. If you want it to span several categories, replace TAG_ID with array(1, 2) where 1 and 2 are your categories ID.
  • The value 'both' will display both the lowest rated posts and pages.
  • If you want to display the lowest rated posts only, replace 'both' with 'post'.
  • If you want to display the lowest rated pages only, replace 'both' with 'page'.
  • The value 0 refers to the minimum votes required before the post get shown.
  • The value 10 will display only the top 10 lowest rated posts/pages.

To Display Lowest Rated Post In A Category

  • Use:
<?php if (function_exists('get_lowest_rated_category')): ?>
    <ul>
        <?php get_lowest_rated_category(CATEGORY_ID); ?>
    </ul>
<?php endif; ?>
  • Default: get_lowest_rated_category(CATEGORY_ID, 'both', 0, 10)
  • Replace CATEGORY_ID will your category ID. If you want it to span several categories, replace CATEGORY_ID with array(1, 2) where 1 and 2 are your categories ID.
  • The value 'both' will display both the lowest rated posts and pages.
  • If you want to display the lowest rated posts only, replace 'both' with 'post'.
  • If you want to display the lowest rated pages only, replace 'both' with 'page'.
  • The value 0 refers to the minimum votes required before the post get shown.
  • The value 10 will display only the top 10 lowest rated posts/pages.

To Display Highest Rated Post

  • Use:
<?php if (function_exists('get_highest_rated')): ?>
    <ul>
        <?php get_highest_rated(); ?>
    </ul>
<?php endif; ?>
  • Default: get_highest_rated('both', 0, 10)
  • The value 'both' will display both the highest rated posts and pages.
  • If you want to display the highest rated posts only, replace 'both' with 'post'.
  • If you want to display the highest rated pages only, replace 'both' with 'page'.
  • The value 0 refers to the minimum votes required before the post get shown.
  • The value 10 will display only the top 10 highest rated posts/pages.

To Display Highest Rated Post By Tag

  • Use:
<?php if (function_exists('get_highest_rated_tag')): ?>
    <ul>
        <?php get_highest_rated_tag(TAG_ID); ?>
    </ul>
<?php endif; ?>
  • Default: get_highest_rated_tag(TAG_ID, 'both', 0, 10)
  • Replace TAG_ID will your tag ID. If you want it to span several categories, replace TAG_ID with array(1, 2) where 1 and 2 are your categories ID.
  • The value 'both' will display both the highest rated posts and pages.
  • If you want to display the highest rated posts only, replace 'both' with 'post'.
  • If you want to display the highest rated pages only, replace 'both' with 'page'.
  • The value 0 refers to the minimum votes required before the post get shown.
  • The value 10 will display only the top 10 highest rated posts/pages.

To Display Highest Rated Post In A Category

  • Use:
<?php if (function_exists('get_highest_rated_category')): ?>
    <ul>
        <?php get_highest_rated_category(CATEGORY_ID); ?>
    </ul>
<?php endif; ?>
  • Default: get_highest_rated_category(CATEGORY_ID, 'both', 0, 10)
  • Replace CATEGORY_ID will your category ID. If you want it to span several categories, replace CATEGORY_ID with array(1, 2) where 1 and 2 are your categories ID.
  • The value 'both' will display both the highest rated posts and pages.
  • If you want to display the highest rated posts only, replace 'both' with 'post'.
  • If you want to display the highest rated pages only, replace 'both' with 'page'.
  • The value 0 refers to the minimum votes required before the post get shown.
  • The value 10 will display only the top 10 highest rated posts/pages.

To Display Highest Rated Post Within A Given Period

  • Use:
<?php if (function_exists('get_highest_rated_range')): ?>
    <ul>
        <?php get_highest_rated_range('1 day'); ?>
    </ul>
<?php endif; ?>
  • Default: get_highest_rated_range('1 day', 'both', 10)
  • The value '1 day' will be the range that you want. You can use '2 days', '1 month', etc.
  • The value 'both' will display both the most rated posts and pages.
  • If you want to display the most rated posts only, replace 'both' with 'post'.
  • If you want to display the most rated pages only, replace 'both' with 'page'.
  • The value 10 will display only the top 10 most rated posts/pages.

To Display Most Rated Post

  • Use:
<?php if (function_exists('get_most_rated')): ?>
    <ul>
        <?php get_most_rated(); ?>
    </ul>
<?php endif; ?>
  • Default: get_most_rated('both', 0, 10)
  • The value 'both' will display both the most rated posts and pages.
  • If you want to display the most rated posts only, replace 'both' with 'post'.
  • If you want to display the most rated pages only, replace 'both' with 'page'.
  • The value 0 refers to the minimum votes required before the post get shown.
  • The value 10 will display only the top 10 most rated posts/pages.

To Display Most Rated Post In A Category

  • Use:
<?php if (function_exists('get_most_rated_category')): ?>
    <ul>
        <?php get_most_rated_category(CATEGORY_ID); ?>
    </ul>
<?php endif; ?>
  • Default: get_most_rated_category(CATEGORY_ID, 'both', 0, 10)
  • Replace CATEGORY_ID will your category ID. If you want it to span several categories, replace CATEGORY_ID with array(1, 2) where 1 and 2 are your categories ID.
  • The value 'both' will display both the most rated posts and pages.
  • If you want to display the most rated posts only, replace 'both' with 'post'.
  • If you want to display the most rated pages only, replace 'both' with 'page'.
  • The value 0 refers to the minimum votes required before the post get shown.
  • The value 10 will display only the top 10 most rated posts/pages.

To Display Most Rated Post Within A Given Period

  • Use:
<?php if (function_exists('get_most_rated_range')): ?>
    <ul>
        <?php get_most_rated_range('1 day'); ?>
    </ul>
<?php endif; ?>
  • Default: get_most_rated_range('1 day', 'both', 10)
  • The value '1 day' will be the range that you want. You can use '2 days', '1 month', etc.
  • The value 'both' will display both the most rated posts and pages.
  • If you want to display the most rated posts only, replace 'both' with 'post'.
  • If you want to display the most rated pages only, replace 'both' with 'page'.
  • The value 10 will display only the top 10 most rated posts/pages.

To Display Highest Score Post

  • Use:
<?php if (function_exists('get_highest_score')): ?>
    <ul>
        <?php get_highest_score(); ?>
    </ul>
<?php endif; ?>
  • Default: get_highest_score('both', 0, 10)
  • The value 'both' will display both the most rated posts and pages.
  • If you want to display the most rated posts only, replace 'both' with 'post'.
  • If you want to display the most rated pages only, replace 'both' with 'page'.
  • The value 0 refers to the minimum votes required before the post get shown.
  • The value 10 will display only the top 10 most rated posts/pages.

To Display Highest Score Post In A Category

  • Use:
<?php if (function_exists('get_highest_score_category')): ?>
    <ul>
        <?php get_highest_score_category(CATEGORY_ID); ?>
    </ul>
<?php endif; ?>
  • Default: get_highest_score_category(CATEGORY_ID, 'both', 0, 10)
  • Replace CATEGORY_ID will your category ID. If you want it to span several categories, replace CATEGORY_ID with array(1, 2) where 1 and 2 are your categories ID.
  • The value 'both' will display both the most rated posts and pages.
  • If you want to display the most rated posts only, replace 'both' with 'post'.
  • If you want to display the most rated pages only, replace 'both' with 'page'.
  • The value 0 refers to the minimum votes required before the post get shown.
  • The value 10 will display only the top 10 most rated posts/pages.

To Display Highest Score Post Within A Given Period

  • Use:
<?php if (function_exists('get_highest_score_range')): ?>
    <ul>
        <?php get_highest_score_range('1 day'); ?>
    </ul>
<?php endif; ?>
  • Default: get_highest_score_range('1 day', 'both', 10)
  • The value '1 day' will be the range that you want. You can use '2 days', '1 month', etc.
  • The value 'both' will display both the most rated posts and pages.
  • If you want to display the most rated posts only, replace 'both' with 'post'.
  • If you want to display the most rated pages only, replace 'both' with 'page'.
  • The value 10 will display only the top 10 most rated posts/pages.

To Sort Highest/Lowest Rated Posts

To Sort Most/Least Rated Posts

Requires: 2.8 or higher
Compatible up to: 3.9
Last Updated: 2014-4-17
Downloads: 995,263

Ratings

3 stars
4 out of 5 stars

Support

38 of 40 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
67,3,2
0,1,0 75,4,3
100,2,2 75,8,6
33,9,3
100,1,1 32,19,6
70,20,14 0,1,0
54,13,7
65,17,11
0,1,0
0,1,0
0,1,0 100,3,3
0,1,0 88,8,7
75,4,3 92,13,12
100,4,4
86,7,6
91,11,10
100,2,2
100,6,6
75,8,6 94,18,17 100,1,1
100,6,6
74,23,17
100,5,5 50,10,5
50,2,1
79,14,11
60,10,6
100,8,8
73,11,8 100,5,5 100,1,1
100,1,1 0,2,0 100,1,1
100,1,1 100,3,3
0,1,0 100,1,1
100,1,1
100,1,1 100,2,2
100,1,1
100,6,6