How To Display Comment Author Ratings?
- Open
wp-content/plugins/wp-postratings/wp-postratings.php
- Find:
//add_filter('comment_text', 'comment_author_ratings_filter');
- Replace:
add_filter('comment_text', 'comment_author_ratings_filter');
How To use PNG images instead of GIF images
- Open
wp-content/plugins/wp-postratings/wp-postratings.php
- Find:
define('RATINGS_IMG_EXT', 'gif');
//define('RATINGS_IMG_EXT', 'png');
- 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?
- Go to
WP-Admin -> Appearance -> Widgets
- The widget name is Ratings.
How To Use Ratings Stats Outside WP Loop?
To Display Lowest Rated Post
<?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
<?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
<?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
<?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
<?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
<?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
<?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
<?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
<?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
<?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
<?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
<?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
<?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