Support » Plugin: Rating-Widget: Star Review System » Show Rating

  • Resolved misterco



    I want to know if there is a shortcode or php function to print post rating where I want?

    For example on my front page I can’t see rating with plugin option (also with “show on exerpt” option), and I want to manualy put a php code on my index.php to show post rating.

    Thanks for your help and for your wonderful plugin!!


Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Vova Feldman


    Hi @misterco,

    First of all, if you can’t see the ratings on your front page while it’s enabled – there is some issue with your theme. Make sure your front pages are using the_excerpt hook to print the excerpts.

    Please let me know if that worked.

    With regards to the short code, since we got so much requests for a shortcode, our next release will have it 🙂

    Thanks for your quick response!

    I think my theme (Nublu) is the problem, my front page is using a theme function limit2 to print excerpt :

    function limits2($max_char, $more_link_text = ‘(more…)’, $stripteaser = 0, $more_file = ”) {
    $content = get_the_content($more_link_text, $stripteaser, $more_file);
    $content = apply_filters(‘the_content’, $content);
    $content = str_replace(‘]]>’, ‘]]>’, $content);
    $content = strip_tags($content, ”);

    if (strlen($_GET[‘p’]) > 0) {
    echo $content;
    else if ((strlen($content)>$max_char) && ($espacio = strpos($content, ” “, $max_char ))) {
    $content = substr($content, 0, $espacio);
    $content = $content;
    echo $content;

    echo “…”;
    else {
    echo $content;

    It is possible to call rating function manually?

    It’s ok for me, I just replace limit2 function by excerpt and it’s works!!

    Your can close this ticket.

    PS : I have rated (five star :P) and comment your plugin 😉

    Plugin Author Vova Feldman


    Great, happy it was resolved! and thanks for the vote up.

    hi my template already has a rating system, but i want to change it with this widget, so i activated this plugin and it works, but i want to change something here:

    1. my site: as you see rating is in the middle of post, i want some code to replace it in place detail sidebar (right corner of site) where i already have a ratings.

    `<?php if(get_option(‘ptthemes_disable_rating’) == ‘no’) { ?>
    <p> <span class=”i_rating”><?php echo RATING.” :aa”; ?></span>
    <span class=”single_rating”>
    <?php echo get_post_rating_star($post->ID); ?>
    </p><?php } ?>`

    here is the code and i want some code of this plugin to replace it with it.\

    2. i want to show ratings in index page:
    you see there is ratings at index page, and code to show this is:

    <?php if($my_post_type != 'post' && get_option('ptthemes_disable_rating') == 'no') { ?><span class="rating"><?php echo get_post_rating_star($post->ID);?></span> <?php } ?>

    i need some code of this plugin to replace it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Show Rating’ is closed to new replies.