Show rating on specific post allow to vote
-
Hello,
I have some trouble figuring out how to show the rating results + voting possibility of a post when on it.
I use a CPT, and on the front page where I list all my posts, everything works perfectly. I use
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
it displays the correct rating for every single post, and allows me to vote. But when I go on the single page of one of those posts, that same code gives me the average rating of all posts.When I use
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
I get the average of all posts, not of the specific post I’m viewing.When I try
`echo the_ratings_results(get_the_ID());’
I see only results, but can’t vote.When I use
<?php if(function_exists('the_ratings_vote')) { echo the_ratings_vote(get_the_ID()); } ?>
it gives me the rating of that specific post, and allows me to vote, but doesn’t update. If I refresh the page it looks like I never voted.Can you please help?
Thank you!
- The topic ‘Show rating on specific post allow to vote’ is closed to new replies.