[Resolved] How to hard code this into theme?
I’ve been using this plugin for quite a while, but every since the upgrade to 2.1, things are not working as they should. I have this plugin hard coded into my theme using the call:
<?php if(function_exists(‘kk_star_ratings’)) : echo kk_star_ratings($pid); endif; ?>
Now, for some reason, this isn’t working properly, and when I have the plugin enabled for posts and pages, the ratings are showing up twice. Can you please tell me how I can fix this? For now, you’ll notice that I have the plugin disabled to show up on posts and pages, though it the rating box still does. This is the only way I can find to have the ratings box show up once until there’s a fix. Unfortunately, when I check the post using Google Rich Snippets, it doesn’t recognize the rating system. Thanks for your help.
I just tagged the new release of 2.1. Please consider re installing. I had some issues with tagging.
About the google rich snippets, you will need to check the Google Rich Snippets checkbox in the settings of the plugin.
And if you are using the kk_star_ratings function in your post or page theme file and also have a shortcode in the posts, it will ofcourse show the ratings twice.
You can avoid this either by not using the function in your theme file or removing the shortcode from the post.
Hope that works out 🙂
Thanks so much for your quick reply, but I don’t think I made myself clear in the first message. I have already installed 2.1 and now am having these problems. I wasn’t having any issues before.
As for the code showing up twice, are you saying that if I’m hard coding it in my theme, that I should have the options for post and page turned off? That’s how I have it now so that it won’t show up twice, but I just want to make sure I’m doing this correctly.
Also, when I test out the Google Rich Snippets using 2.1 of the plugin with any post of mine such as (http://www.mommylivingthelifeofriley.com/giveaways/cardraising/), I get the following:
itemreviewed: GIVEAWAY ~ Win 1 of 10 Cardraising.com $20 Gift Cards and Give 30% Back to Charity
Warning: Either “count” or “votes” field needs to be present.
It seems to me that there’s something not working properly with the plugin and I just want to make sure that I’m not doing something wrong on my end. Thanks for your help with this.
Yes, if you are hardcoding it in your theme, you will have to uncheck the option to show it in those areas.
Google rich snippets is not working because you need to use the [avg] and [total] in the legend.
Right now you do not have [total] in your legend. If you see the description given for the legend input, you will see the NOTE.
Hope that helps.
- The topic ‘[Resolved] How to hard code this into theme?’ is closed to new replies.