I need to add star ratings to one of my custom post types. At first I coded them myself but when the rating challenge came along i thought about using a plugin instead, so I used easy post types.

I've tried a couple star rating plugins and none of them seem to work. For example, with WP-PostRatings, I used the next code in my single-customposttype.php:

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

The image shows, but clicking does nothing. The same thing happens with other plugins. Star Ratins only says "an error ocurred" but no other debug info is displayed.

So I don't know if you could recommend alternate plugins or any alternate method to add the star rating feature for my custom post type, because can't get it work as it is.

1 Answer 1


For any rating functionality I always turn to GD Star Rating by Milan Petrovic.

This plugin can do SO many things, including thumb rating, rating of comments, multiple ratings, etc. It can also handle Rich Snippets (for getting your star ratings shown in Google SERPs), caching mechanisms, etc..

In short, it can do a lot, and I generally use it because of its flexibility and capabilities.

You might need to change the code depending on your site, but here is how I have implemented it on one of my sites (in 'single.php' template file):

if (function_exists('wp_gdsr_render_article')) {
    wp_gdsr_render_article(10, false,'',16);

Warning: You will want to familiarize yourself with the settings of the plugin and read up on the documentation, but it will be time well spent.

  • I wrote 'single.php', but if you want to implement for a specific custom post type, you need to create/edit the correct template file. If your custom post type is called "questions", the template file for that taxonomy would be 'single-questions.php' Commented Aug 9, 2012 at 14:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.