July 19th in Wordpress by pbu .

GD star rating issue replacing default 0 value

I was working on a wordpress review project  and was so fascinated with the GD star rating plugin and i felt one real aspect missing.  When a rating or review was not given in the post, the default it shows as  zero.  i want those posts which are not reviewed should be shown as N/A instead of zero.  i found absolutely no way to change this  and there no option for this in the settings page.

The gd rating plugin is called programmatically in my category.php theme template and i was able to get around the problem by checking the category name in the category template.  I created a new category to place all the posts which needed N/A rating and then check category before outputting the review rating.

if (in_category('46')) {
echo "N/A";
 } else {
 if(function_exists('wp_gdsr_render_review')) {
wp_gdsr_render_review(0, 45);  }

}

In the above example, 46 is the category name where i secluded all posts and the 45 is the gd star rating T2 template number.

Similar Posts:

Share and Enjoy:
  • del.icio.us
  • digg
  • StumbleUpon
  • Technorati
  • DZone
  • Facebook
  • FriendFeed
  • Reddit
  • RSS
  • Twitter

Leave A Comment.