GD Star Rating Tips

What is GD Star Rating?

The one *slight* issue with the plugin is complexity. The developer writes excellent developer documentation but at heart he is a software developer. Now coming from a background of software development myself I can understand him but for many WordPress webmasters cracking open your theme, adding a few classes and rewriting comment and post loops is a bit daunting.

If you're in need of some help then feel free to comment below and I'll see what I can do to help. Below you'll find a list of some of the most common issues I've had with GD Star Rating.

Previews show GD Star Rating code when I insert the rating block at "Top and Bottom" through the admin.

If you're using homepage previews like I do on my homepage, you might end up with some GD Star Rating code in your previews. MillanN has already covered this but the easiest thing to do is crack open your single.php (or which page is your post page, this is theme dependent) and add the following bit of code somewhere before your post body:

<br />
<!-- Custom GD Rating Insertion -->
<br />
<?php if (defined("STARRATING_INSTALLED")) : ?>
</p>
<div style="float: left">
<?php wp_gdsr_render_article(); ?>
</div>
<p>
<?php endif;?>
<br />
<!-- End GD Staring Rating -->

This will insert your rating block at the top of the post without affecting your previews.

Obviously this is a bit more complicated than simply adding the Comment to "Top and Bottom" through the settings panel but it's a fairly painless addition - note: the "if" statement above simply detects if GD Star Rating is activated and does not call the function if it it's inactive and prevents errors on your site should you turn it off.

GD Star Ratings Function List

As mentioned above there are a ton of functions you can use to customize the appearance and behavior of GD Star Rating. You might be look for the complete GD Star Rating Functions List - hopefully you find that useful in your customization and development.

Web Analytics