Hi damshaw,
There’s a code snippet you can use in the Pro version, but not the free version as it does have in built functions to checks ratings exist against a user.
Here’s a code snippet for the Pro version you can use:
<?php
// get post id - assumes in WP loop
global $post;
$post_id = $post->ID;
// get default rating form for post, this checks the filter settings, post meta and general settings
$rating_form_id = MRP_Utils::get_rating_form( $post_id );
// get current logged in user
$user_id = 0; // anonymous
$user = wp_get_current_user();
if ( $user && $user->ID ) {
$user_id = $user->ID;
}
// show rating form if user has not yet rated, otherwise show rating item
if ( ! MRP_Multi_Rating_API::user_rating_exists( $rating_form_id, $post_id, $user_id ) ) {
mrp_rating_form();
} else {
mrp_rating_result();
}
Some documentation on template tags in the Pro version here
Daniel
-
This reply was modified 7 years, 9 months ago by
dpowney. Reason: gist embed not working
-
This reply was modified 7 years, 9 months ago by
dpowney. Reason: typo in template tag
-
This reply was modified 7 years, 9 months ago by
dpowney.
-
This reply was modified 7 years, 9 months ago by
dpowney. Reason: update comments