best and worst rating
-
hi,
i use 3rd party schema plugin. show i want worst and best rating value in custom field data. rating is true, rate my post plugin create only rating count, avg and value sum in the custom field. but not create best and worst rating value.show i simply add the code in the plugin editor. class-rate-my-post-admin.php
// update vote count, sum of ratings and average rating if ( ! add_post_meta( $post_id, 'rmp_vote_count', $vote_count, true ) ) { update_post_meta( $post_id, 'rmp_vote_count', $vote_count ); } if ( ! add_post_meta( $post_id, 'rmp_rating_val_sum', $rating_sum, true ) ) { update_post_meta( $post_id, 'rmp_rating_val_sum', $rating_sum ); } if ( ! add_post_meta( $post_id, 'rmp_avg_rating', $avg_rating, true ) ) { update_post_meta( $post_id, 'rmp_avg_rating', $avg_rating ); } if ( ! add_post_meta( $post_id, 'rmp_vote_count', $vote_count, true ) ) { update_post_meta( $post_id, 'rmp_best_rating', 5 ); } if ( ! add_post_meta( $post_id, 'rmp_vote_count', $vote_count, true ) ) { update_post_meta( $post_id, 'rmp_worst_rating', 1 ); }
its only work in update via post editor. not updated when user rating in the post front end and also this method is not a permanent solution. please make this option next updated version.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘best and worst rating’ is closed to new replies.