Is there a way to show the star rating on truncated posts? For example, my theme truncates a post over X amount of characters and then displays a Read More link. When a truncated post has the shortcode for Five Star Rating it is shown as asterisks.
What do I need to modify to change this behavior?
You can do that, but the down side of doing this is that the ratings will show up on all pages that you insert the code on.
What I usually do is create a copy of Page (page.php) and rename it rating_page.php and change name of template to Rating Page. In it you can insert the code below (it is in the FAQ) where you want the ratings to appear all the time.
<?php echo five_star_rating_func('star'); ?>
Once you save the changes, you will see the ratings appear on every post that uses that page.
Thank you for the quick reply.
I have created a post template with the code in it and it’s working great, however the Five Star Rating stars don’t appear in the truncated posts which are being displayed on the page, they only appear when going to the post itself.
Here is an example:
That page is set to display a widget, that widget is set to show only posts from a certain category (in this case it’s “user submitted content”). I would like for every post displayed via the widget on that page to display the voteable stars without the user having to click into the post to vote.
Again thank you very much for taking the time.
- The topic ‘[Plugin: Five Star Rating] Truncated posts’ is closed to new replies.