What's WP
Our everything is about WordPress - best choice of WordPress users!
How to Add a Simple Post Rating System in WordPress

How to Add a Simple Post Rating System in WordPress

Adding a simple post rating system in WordPress using WordPress plugin is great for webmasters looking for an understandable way to achieve the goal. Here, the selected plugin is WP-PostRatings, which is an AJAX rating system for your website post or page. We would like to show you how to install this plugin as well as how to take a good use of it.

Install WP-PostRatings Plugin on Your Site

WP-PostRatings plugin enables multiple options for customizing your post rating system, in terms of appearance and functions. Install it on your WordPress site right now and get to know more about this rich-featured plugin. Log into WP admin and search for WP-PostRatings released by Lester ‘GaMerZ’ Chan. Click “Install Now” upon activation to make it work for your site smoothly.

Install WP-PostRatings Plugin

A new item named as “Ratings” appears on the sidebar, which further includes three options, namely, Manage Ratings, Ratings Options and Ratings Templates. Go to Ratings > Manage Ratings, and this is where to check post ratings logs & post rating logs stats and delete post ratings data/logs. Leave this item and move to Ratings Options.

Manage Ratings

Ratings Options

Go to Ratings > Ratings Options and that enables various settings for your post ratings customization, further divided into Ratings Settings, Individual Rating Text/Value, Ratings AJAX Style, Allow To Rate and Logging Method. We would like to show you more details as below.

Ratings Settings

Ratings Settings

There are multiple ratings images available for you and the default one is “stars”. Perhaps, any other images are allowed to be shown on the rating system as you required, such as updown_crystal, heart, thumbs, and so on.

And then, move to Max Ratings and this is where to set the maximum ratings. The default number is “5” and that can be modified to other targets according to personal needs. Note that, the Max Ratings is only valid for certain ratings images, including Squares, Stars, Bars, Stars_Dark and Stars_Crystal. The other options are available for specific number of ratings.

“Enable Google Rich Snippets?” leaves you a “yes or no” question on whether to enable rich snippets for your post rating system. Since rich snippets have been regarded as a great way to get web content noticed, enabling Google Rich Snippets is advisable. If you have a higher demand on this feature, go with some premium WordPress rich snippets plugins, like Rich Contact Widget, AuthorSure, Rating Widget, etc.

Individual Rating Text/Value

Individual Rating Text Value

By default, there are 5 options for the customization of rating text and rating value. If there is no change for Max Ratings, then you can leave this option and turn to the next setting. If not, let’s say you set the max ratings as “7”, then there newly comes two blanks below the default 5 options. Here, you should fill out the rating text and rating value as required. Since everything gets ready, move to Ratings AJAX Style.

Ratings AJAX Style

Ratings AJAX Style

This is where to set the ratings AJAX style and that is further divided into two options. Make up your mind on whether to show loading image with text and whether to show fading in & fading out of ratings. That depends.

Allow to Rate & Logging Method

Allow to Rate & Logging Method

“Allow to Rate” is used to specify who is allowed to rate? That can be registered users & guests, registered users only or guests only. Besides, the “Logging Method” enables five methods for ratings logging, in terms of logged by cookie & IP, logged by cookie, logged by IP, logged by username and do not log. Modify the two options if needed and click “Save Changes” to confirm all settings.

Ratings Templates

Various templates are show on the Ratings Template interface for different purposes, like ratings vote text, ratings voted text, ratings no permission text, and so on. Each template comes with two buttons for restoring default template, which is designed for users sick of thinking too much on a mess of variables. If you are one of them, then you can leave the default settings and “Save Changes”.

Perhaps, if you are good at the use of variables, it is great to make some changes to each ratings templates by using the template variables given on the top of Post Ratings Templates setting page.

Post Ratings Templates

Display Ratings on Your Website

Since you have all settings done, you should set about adding the following line of code to any files as needed, like single.php, post.php, archive.php and so on. That can be done via WP admin > Appearance > Editor or your control panel > FTP Manager. Open the target file in any editor and search for <?php while (have_posts()) : the_post(); ?>. And then, add the following code to anywhere under this line.

<?php if(function_exists('the_ratings')) { the_ratings(); } ?>

However, if you just want to display ratings on certain posts or pages, then you should add the shortcode [ratings] to the target posts/pages. Besides, the shortcodes [ratings id=”1″] and [ratings id=”1″ results=”true”] are used to embed other post ratings and embed other post ratings results.

Add a Post Rating System in WordPress with More Methods

WP-PostRatings plugin is one of the most excellent plugins for rating system, which comes with a bunch of advanced features and easy to understand, even for beginners. If you wish to get more recommendations to add a simple post rating system in WordPress, select one from the following list.

  • Another Post Ratings – Unlike the common post rating plugins only allowing visitors to rate posts, this plugin enables author rate post and that should be valued from one to five stars. The given shortcode makes it possible for you to add rating to any page, post or custom post type. The post rating will be automatically shown on the top or the bottom of the web page.
  • Rating-Widget: Star Rating System – It is a premium five star rating system and user-friendly for posts & pages, comments, bbPress forums, WooCommerce and BuddyPress on your site. And now, the pro version has been released with more advanced features.
  • Yasr-Yet Another Starts Rating – This plugin is great for review sites, for which displays reviewer vote and visitors votes clearly on the website. The scores and ratings are included in snippets and that will be indexed by search engines easily. Obviously, it promotes inactivation between you and your visitors effectively.

Author

Lucy has been a very experienced SEOer, technical writer, web developer, c# developer since 2002. Now she owns a startup in San Francisco, CA, focusing on running a couple of blogs to share knowledge and experience with global readers and deliver exceptional results to global sponsors by leveraging the power of Internet.

Close

Want to Learn More About WordPress?

Get Our Free Themes, Plugins, Support, SEO Tips, and Other Tutorials!

Email *