• Resolved barocke

    (@barocke)


    Hi,

    My current website is displaying album thumbnails listing with an smiley icon to indicate user’s feeling about the albums. I try your plugin and like it very much and I would really like to replace the smileys with the final rating scores with your plugin. Is what I try to do achievable with a code snippet in the listing loop php I highlighted here?

    I would be very happy to purchase the Pro version if this is achievable. Please see screenshots here:

    Screenshot 1
    Screenshot 2

    I look forward to hearing from you soon.

    Regards,
    Max

    • This topic was modified 4 years, 11 months ago by barocke.
    • This topic was modified 4 years, 11 months ago by barocke.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • I need your same function, I hope the support will respond soon, the plugin is really nice, just missing this possibility

    • This reply was modified 4 years, 11 months ago by vdmweb.
    Plugin Contributor contactashish13

    (@rozroz)

    @vdmweb @barocke here is a snippet of code that you can use.

    
    // get the ID of the post as $post_id
    $review = new WPPR_Review_Model($post_id);
    $rating = $review->get_rating();
    // display the rating icon or use $rating to display a custom icon
    echo wppr_layout_get_rating( $review, 'donut', 'default', array( 'review-wu-grade' ) );
    
    Thread Starter barocke

    (@barocke)

    Hi contactashish13,

    Thank you so much for the code snippet, it works a treat. Except I would change new WPPR_Review_Model($post_id); to new WPPR_Review_Model(get_the_ID());

    Much appreciated!

    Hi, first of all thanks for the replies @barocke by chance you can explain how you implemented the I tried but I don’t get results

    Plugin Contributor contactashish13

    (@rozroz)

    @barocke Happy to have helped you.

    If you are satisfied with our product and support, kindly spare a moment to leave us a review. It would really help us spread the word!

    Thread Starter barocke

    (@barocke)

    @vdmweb,

    Sorry for the delay.

    I used code snippet provided by @rozroz in my listing loop php, except I replaced the $post_id to get_the_ID(). I initially did not see the rating visually as it was hidden underneath the image. I checked this vwith Chrome Inspect – See screenshot: https://www.dropbox.com/s/dalls25xhy4q1yf/Inspect-Code.jpg?dl=0

    <div class=”review-wu-grade”> indicates that the rating was actually created but my thumbnail image holder had z-index set to lay above it visually. I then reset my thumbnail image holder z-index to 0 to reveal the rating visually and used css to move it to top right corner.

    // get the ID of the post as $post_id
    $review = new WPPR_Review_Model(get_the_ID())
    $rating = $review->get_rating();
    // display the rating icon or use $rating to display a custom icon
    echo wppr_layout_get_rating( $review, ‘donut’, ‘default’, array( ‘review-wu-grade’ ) );

    • This reply was modified 4 years, 11 months ago by barocke.
    Plugin Contributor contactashish13

    (@rozroz)

    @vdmweb I hope you have been able to solve this.

    Plugin Contributor contactashish13

    (@rozroz)

    We haven’t heard from you in sometime so marking this as Resolved. If you continue to face an issue, please create a new ticket. We’d be happy to help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Can I get the code snippet to display final rating score on homepage listings?’ is closed to new replies.