• Resolved w3bit

    (@w3bit)


    I have a problem with using the ‘ratemypost-result’ shortcode at a loop. because you are using the include_once at shortcode_get_the_results_widget method, I cannot call this shortcode in a loop, it just prints the first result widget.
    Is there any alternative way I can print results in a loop at my theme?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Blaz K.

    (@blazk)

    Hi @w3bit,

    thanks for letting me know about this issue. I’ll check it out and see what can be done. However, you can also use the following functions to output the results:

    rmp_get_avg_rating( $postID ) //returns average rating
    rmp_get_vote_count( $postID ) // returns vote count
    rmp_get_visual_rating( $postID ) // returns visual rating – star rating

    More about this in the documentation.

    Regards,
    Blaz

    • This reply was modified 6 years, 2 months ago by Blaz K..
    Plugin Support Blaz K.

    (@blazk)

    @w3bit, I checked and I think you might be using an older version of the plugin. In version 3+ include_once is not used. See below:

    
    if ( $this->is_amp_page() && $this->is_amp_enabled() ) { // amp
      ob_start();
      include $results_widget_amp;
      return $this->remove_line_breaks( ob_get_clean() );
      } elseif( ! $this->is_amp_page() ) { // non amp
        ob_start();
        include $results_widget;
        return $this->remove_line_breaks( ob_get_clean() );
      }
    

    Regards,
    Blaz

    Thread Starter w3bit

    (@w3bit)

    Sorry, I was using an old version of your plugin, at the new version, everything works well.
    Thank you so much for this amazing plugin and your support.

    Plugin Support Blaz K.

    (@blazk)

    You are welcome 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘problem with calling “ratemypost-result” shortcode in a loop’ is closed to new replies.