Wordpress: Post Rating Plugin for WordPress
Post Rating plugin is a must for Wordpress powered sites that runs a popularity type of post/contest daily, weekly or monthly.
The WP-PostRatings 1.10 by Lester Chan adds an AJAX rating system for your WordPress blog’s post/page.
General Usage
Open wp-content/themes/<YOUR THEME NAME>/index.php
You may place it in single.php, post.php or page.php also.
Find:
[php]<?php while (have_posts()) : the_post(); ?> [/php]
Add Anywhere Below It (The Place You Want The Ratings To Show):
[php]<?php if(function_exists(’the_ratings’)) { the_ratings(); } ?> [/php]
If you DO NOT want the ratings to appear in every post, DO NOT use the code above. Just type in [ratings] into the selected post content and it will embed ratings into that post only.
Note
Note: In IE, some of the post ratings’ text may appear jagged (this is normal in IE). To solve this issue,
Open postratings-css.css
Find:
/* background-color: #ffffff; */
Replace:
background-color: #ffffff;
Where #ffffff should be your background color for the poll.
Ratings Stats (Outside WP Loop)
To Display Highest Rated Post
Use:
[php]<?php if (function_exists(’get_highest_rated’)): ?>
<ul>
<?php get_highest_rated(); ?>
</ul>
<?php endif; ?> [/php]
Default: get_highest_rated(’both’, 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 10 will display only the top 10 highest rated posts/pages.
To Display Highest Rated Post In A Category
Use:
[php]<?php if (function_exists(’get_highest_rated_category’)): ?>
<ul>
<?php get_highest_rated_category(); ?>
</ul>
<?php endif; ?> [/php]
Default: get_highest_rated_category(0, ‘both’, 10)
The value 0 will display highest rated post from category id 0.
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 10 will display only the top 10 highest rated posts/pages.
To Display Most Rated Post
Use:
[php]<?php if (function_exists(’get_most_rated’)): ?>
<ul>
<?php get_most_rated(); ?>
</ul>
<?php endif; ?> [/php]
Default: get_most_rated(’both’, 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 10 will display only the top 10 most rated posts/pages.


March 5th, 2007 at 4:35 am Quote
[…] Post Rating plugin is a must for Wordpress powered sites that runs a popularity type of post/contest daily, weekly or monthly. The WP-PostRatings 1.10. (continues) […]
(Report comment)