I love GD Star Rating, but I hate it at the same time. Why does it have to be so difficult to implement?
Anyway here’s what I’m trying to accomplish. On my blog posts I have a standard 24px Plain star rating that I’ve manually inserted. That’s fine and dandy.
However on my category pages, where I have 20 posts listed with thumbnails thumbnail, I would like to display the total rating for each post with just the stars (no text & no voting) AND I want to use a 16px sized star.
Anyone have a clue how to do this? I’ve searched everywhere and there’s almost no documentation about using multiple star sizes in different locations.
Well I managed to figure it out so here’s what you need to do if you want to have one size star rating on the blog page and another sized star block on a category or archives page.
First go to T2 templates on your WP dashboard and find #10 Default Standard Rating Block.
Click Duplicate on the right side.
If you want to only show the star rating, with no additional text go into your newly duplicated template and remove everything except
<div class="ratingblock %CSS_BLOCK%"><div class="ratingstars %CSS_STARS%">%RATING_STARS%</div></div>
This will only show star ratings when you use this template.
Now go to your cat or archives.php page in WP and insert the following php call where you want the rating block to show.
<?wp_gdsr_render_article ($template_id=46, $read_only=true, $stars_set="plain", $stars_size=12, $stars_set_ie6="plain", $echo=true) ?>
Replace the template number with the number of the template you created in the first steps. You can also specify which star style and size you want by changing those parameters in the call above. If you want people to have voting ability, change read only to false.
Hopefully this will help others who’ve been trying to figure out how to use multiple star sizes in different areas of your blog or site.
- The topic ‘GD Star Rating – Only Show Stars & Using Multiple Star Sizes’ is closed to new replies.