WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

closed as off-topic by kaiser May 30 at 1:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 3 down vote accepted

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.

share|improve this answer
    
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' – Lars Koudal Aug 9 '12 at 14:39

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