
Rate my Post is a free WordPress rating plugin. It allows visitors to rate your posts and can be downloaded from the official WordPress plugin directory.
Table of Contents:
- Installation
- Getting Started
- Options
- Filters
- Actions
- Global Functions/Methods
- Javascript Functions/Methods
- CSS Snippets
- Custom Templates
- Troubleshooting
- AMP Compatibility (BETA)
- Tutorials
Installation
From the Dashboard (Recommended):
- Navigate to Dashboard ▸ Plugins ▸ Add New
- Search for Rate my Post
- Click Install
- Click Activate
Manual Installation:
- Download the plugin as a .zip file;
- Unzip downloaded archive and upload rate-my-post folder under your /wp-content/plugins/ directory
- Navigate to Dashboard ▸ Plugins
- Click Activate
Getting started
After the installation you can embed the rating widget to your posts with the shortcode [ratemypost] or automatically in the plugin’s settings. The “rating widget” allows visitors to rate your posts (star rating). The plugin also comes with the results widget. The results widget shows the rating, but is not interactive (it doesn’t accept votes). On most websites you will find such a widget at the top of the post, after the title. You can embed the results widget with the shortcode [ratemypost-result] or automatically in the plugin’s settings.
It is also possible to embed a rating of whichever post by passing the id of the post to the shortcode.
[ratemypost id=”1″] – embeds rating widget for the post with the id of 1
[ratemypost-result id=”1″] – embeds results widget for the post with the id of 1
Options
The Rate my Post plugin is probably the most customizable and adjustable WordPress rating plugin. It comes with many options which allow you to completely customize the plugin so that it fits your website.
Settings

Below is a brief description of settings that might be a bit confusing to beginners.
Show star hover texts
This is a handy feature to prevent accidental votes. When a user hovers over the stars, the descriptive rating is shown under the stars.
Disabled (hovering over two stars):

Enabled (hovering over two stars):

Prevent accidental votes
When a visitor clicks on a star, he/she needs to confirm the vote by clicking the “Rate” button that pops up under the widget. It prevents the visitors from accidentally casting votes. This feature is especially useful for touch devices.

Delete cookie on page load
After the page is refreshed the cookie is deleted. This feature comes in handy while you are setting up the plugin, and might want to cast multiple votes to see how the plugin performs.
Exclude rating and result widget from
If you automatically add the rating/results widget to your posts or pages in the options, you might want to remove it from specific posts/pages, for example the about us page. Here you should insert Insert comma separated post/page IDs. To get the post ID, visit posts/pages menu in your admin dashboard and click on the page/post that you need an ID for. Then check the URL and you should see something like “www.example.com/wp-admin/post.php?post=61&action=edit”. The ID is the number in the URL. In this case it is 61.
Type of structured data for rich snippets
Here you can select which type of structured data you want to embed. If your website is trustworthy and high-quality, search engines might show rich snippets on results pages. The Rate my Post plugin supports all structured data types that are recognized by Google except HowTo, SoftwareApplication and Event. SoftwareApplication and Event structured data types are available in the PRO version. Note that since September 2019, Google shows rich snippets only for a handful of structured data types. Read more about this here.
If you are not sure which structured data type to choose, find information about each structured data type on schema.org. If you blog posts don’t fit any of the available categories, you are according to Google Guidelines not eligible for rich snippets.
Feedback Widget
It can be enabled in the settings. The Feedback Widget allows visitors to send you private feedback after they rated a post on your website. The idea behind the feedback widget is that you can improve your posts. It will be shown if the post gets a negative rating. You define what is a negative rating in the settings; “If post or page is rated X/5 stars or less, consider the rating negative.”.

Social Widget
It can be enabled in the options. The Social Widget shows social follow or social share icons/links after the post has been rated positively. You define what is a positive rating in the options. You can also chose whether to show social follow buttons or social share buttons.

Show ratings on archive pages
This feature will show ratings with stars on archive pages (list of posts) next to the title. It will also show ratings on the main blog page.
Multilingual website compatibility mode
If your website is available in more than one language, you should enable this feature. After enabling this feature, you won’t be able to modify strings in the Customize section. You should instead modify strings with a translations plugin such as Loco Translate.
Customize

In the customize section you can change colors, sizes and modify strings. All settings here are pretty straightforward.
Security Options

Ratings manipulation requires role of
Rate my Post enables you to change ratings in the backend in the post editor (metabox at the bottom). Here you can set which role is required to manipulate ratings. Available options are: Admin, Author and Editor.

Who can rate posts
Here you can select who can rate posts. By default all visitors can rate posts. Nevertheless, you can limit rating capability to only logged-in users.
Track IP addresses
If this feature is enabled, IP addresses of voters will be tracked and available in the Analytics section. This feature must be enabled if you want to prevent double votes via IP address. If this feature is enabled, GDPR compliance is voided.
Track users
If this feature is enabled, you will see the nicknames of logged-in users who rated your posts in the analytics section. This feature also prevents double votes for logged-in users.
Google reCAPTCHA v3
Google reCAPTCHA v3 verifies if an interaction is legitimate without any user interaction. You will need the reCAPTCHA v3 site key and the secret key to use this option. The service is free of charge. You can get the keys here: reCAPTCHA v3.
Migration Tools

The migration tools allow you to migrate votes and ratings from kk Star Ratings, YASR and WP-PostRatings with one click. The tools are available if one of the mentioned plugins is installed on your website.
Filters
Filters provide a way for functions to modify data of Rate my Post functions.
Modifying strings for custom post types, specific categories etc.
rmp_custom_strings
The rmp_custom_strings filter allows you to change strings in various scenarios. For example, if you have a book custom post type, you probably want different texts in the book posts. The strings for the book posts can be easily modified as shown in the example below.
/*FILTER EXAMPLE
The array has the following keys:
rateTitle,
rateSubtitle,
rateResult,
rateResult2,
cookieNotice,
noRating,
afterVote,
star1,
star2,
star3,
star4,
star5,
socialTitle,
socialSubtitle,
feedbackTitle,
feedbackSubtitle,
feedbackText,
feedbackNotice,
feedbackButton,
feedbackAlert,
submitButtonText
*/
function blazzdev_modify_rmp_strings( $stringsArray ) {
if ( is_singular( 'book' ) ) { //modify only for Book custom post type
$stringsArray['rateTitle'] = 'Did you like this book?';
$stringsArray['rateSubtitle'] = 'Click on a star to rate this book!';
$stringsArray['afterVote'] = 'Thank you for rating this book';
$stringsArray['socialTitle'] = 'As you found this book useful...';
$stringsArray['feedbackTitle'] = 'How come you did not like this book?';
$stringsArray['feedbackSubtitle'] = 'How could this book be improved?';
$stringsArray['feedbackText'] = 'Give us some tips...';
}
return $stringsArray;
}
add_filter( 'rmp_custom_strings', 'blazzdev_modify_rmp_strings' );
Code goes to your child theme’s functions.php.
Removing specific social share icons
rmp_social_links
If you enable the social widget and the “use social share icons instead of social follow icons” in the settings, the plugin will by default print all available social share icons. However, you can remove specific social share icons with the filter as shown below. The snippet below will remove the Twitter and the Reddit social share icon.
function blazzdev_remove_social_icons( $socialLinks ) {
unset( $socialLinks['twitter'] );
unset( $socialLinks['reddit'] );
return $socialLinks;
}
add_filter( 'rmp_social_links', 'blazzdev_remove_social_icons' );
Code goes to your child theme’s functions.php.
Remove rating widget from posts in specific category
rmp_display_rating_widget
The snippet below will remove rating widget from posts in uncategorized category
add_filter( 'rmp_display_rating_widget', 'blazzdev_show_rating_widget' );
function blazzdev_show_rating_widget() {
if( in_category( 'uncategorized' ) ) { // category slug
return false;
}
return true;
}
Code goes to your child theme’s functions.php.
Remove results widget from posts in specific category
rmp_display_results_widget
The snippet below will remove results widget from posts in uncategorized category
add_filter( 'rmp_display_results_widget', 'blazzdev_show_results_widget' );
function blazzdev_show_results_widget() {
if( in_category( 'uncategorized' ) ) { // category slug
return false;
}
return true;
}
Code goes to your child theme’s functions.php.
Change best rating
rmp_display_results_widget
The snippet below will change 5-star rating system to 10-star rating system.
Warning: After enabling there is no way of going back to 5 star rating system except by deleting all ratings.
add_filter( 'rmp_max_rating', 'blazzdev_max_rating', 10, 1 );
add_filter( 'rmp_custom_strings', 'blazzdev_modify_rmp_strings' );
function blazzdev_max_rating( $rating ) {
return 10;
}
function blazzdev_modify_rmp_strings( $stringsArray ) {
$stringsArray['star6'] = 'Perfect';
$stringsArray['star7'] = 'Perfect';
$stringsArray['star8'] = 'Perfect';
$stringsArray['star9'] = 'Perfect';
$stringsArray['star10'] = 'Perfect';
return $stringsArray;
}
Code goes to your child theme’s functions.php.
Remove ratings from specific archive pages or home page
rmp_archive_results
If you enable the “show ratings on archive pages” feature in the settings, the plugin will by default show ratings on all archive pages and the main blog page. With this filter you can remove ratings from specific archives or the main blog page.
Example 1:
The code below will remove ratings from author archives.
function blazzdev_exclude_author( $content ) {
if ( is_author() ) {
return false;
} else {
return $content;
}
}
add_filter( 'rmp_archive_results', 'blazzdev_exclude_author' );
Code goes to your child theme’s functions.php.
Example 2:
The snippet below will remove ratings from the main blog page.
function blazzdev_exclude_home( $content ) {
if ( is_home() ) {
return false;
} else {
return $content;
}
}
add_filter( 'rmp_archive_results', 'blazzdev_exclude_home' );
Code goes to your child theme’s functions.php.
Replacing the default icons (stars etc.) with custom icons
rmp_rating_icon_class
This filter enables you to add a custom class to the icon or simply replace the default class with the custom class. Therefore, you can use your own icons (via background-image property) or whichever icon from FontAwesome (if you use FontAwesome on your website). The code below will replace the stars with the FontAwesome car icons.
The first thing you should do, is to detach “ratemypost” font from the icons with custom CSS:
[class^="rmp-icon--"], [class*=" rmp-icon--"] {
font-family: 'Font Awesome 5 Free'!important;
}
Code goes to your child theme’s style.css.
Then you append the FontAwesome car icon to Rate my Post icons like shown below:
function blazzdev_custom_class( $class ) {
return $class . ' fas fa-car';
}
add_filter( 'rmp_rating_icon_class', 'blazzdev_custom_class' );
Code goes to your child theme’s functions.php.
Changing the schema type
rmp_schema_type
This filter enables you to change the schema type.
Example 1 – Change the schema type for a custom type:
Let’s say that you have a custom post type of recipe and of course you want the recipe schema in all recipe posts. Nevertheless, elsewhere you want the schema type selected in the options.
function blazzdev_schema( $schemaType ) {
if( is_singular( 'recipe' ) ) {
return 'Recipe';
}
return $schemaType;
}
add_filter( 'rmp_schema_type', 'blazzdev_schema' );
Code goes to your child theme’s functions.php.
Changing the structured data
rmp_structured_data
This filter enables you to modify the complete structured data.
Example:
function blazzdev_structured_data( $structuredData ) {
$structuredData = '
<script type="application/ld+json">
//your structured data
</script>
';
return $structuredData;
}
add_filter( 'rmp_structured_data', 'blazzdev_structured_data' );
Code goes to your child theme’s functions.php.
Remove IP double vote protection for posts, custom post types etc.
rmp_double_vote
This filter enables you to remove IP double vote protection if specified conditions are met. In the example below we remove IP double vote protection for the post with the ID of 246.
function blazzdev_remove_ip_double_vote( $doubleVotes, $postID ) {
if ( $postID == 246 ) {
//return an empty array - meaning no matches for the ip
$doubleVotes = array();
}
return $doubleVotes;
}
add_filter( 'rmp_double_vote', 'blazzdev_remove_ip_double_vote', 10, 2 );
Code goes to your child theme’s functions.php.
Remove double vote protection based on user IDs (applies only to logged in users)
rmp_double_vote_by_id
If user tracking is enabled in the security options the plugin checks if user has already rated the post before saving the rating. This is useful in case you only allow logged-in users to rate. The plugin doesn’t run this check for admins. To disable double vote protection based on user IDs use the filter as shown below.
add_filter( 'rmp_double_vote_by_id', 'blazzdev_disable_double_vote_protection_by_id', 10, 2 );
function blazzdev_disable_double_vote_protection_by_id( $match, $post_id ) {
return array();
}
Code goes to your child theme’s functions.php.
Hide usernames in the analytics section and feedback section
rmp_rater_username
If user tracking is enabled, usernames are shown in the analytics and feedback section. If you are only using user tracking to prevent double votes and you want to hide usernames in the analytics and feedback section, use this filter as shown below.
add_filter( 'rmp_rater_username', 'blazzdev_hide_rater_username' );
function blazzdev_hide_rater_username( $username ) {
return 'Hidden for privacy reasons!';
}
Code goes to your child theme’s functions.php.
Merge ratings during the migration
rmp_migrate_merge
This filter enables you to merge the ratings of Rate my Post plugin and another plugin during the migration. Rate my Post supports migration from the following plugins: kk Star Ratings, YASR and WP-PostRatings.
function blazzdev_merge_during_migration( $merge ) {
return true;
}
add_filter( 'rmp_migrate_merge', 'blazzdev_merge_during_migration' );
Code goes to your child theme’s functions.php.
Change email address
rmp_mail_address
Rate my Post plugin by default sends emails about new votes and feedback to the admin email. You can change the email with this filter.
add_filter( 'rmp_mail_address', 'blazzdev_change_rmp_email' );
function blazzdev_change_rmp_email( $email ) {
return '[email protected]';
}
Code goes to your child theme’s functions.php.
Change subject for “post rated” emails
rmp_mail_subject
You can modify the subject of the “post rated” email with this filter.
add_filter( 'rmp_mail_subject', 'blazzdev_rate_mail_custom_title', 10, 7 );
function blazzdev_rate_mail_custom_title( $subject, $postID, $rating, $newAvgRating, $newVoteCount, $postTitle, $postLink ) {
return $postTitle. ' rated ' . $rating . ' and now has ' . $newVoteCount . ' votes and rating of ' . $newAvgRating;
}
Code goes to your child theme’s functions.php.
Change text for “post rated” emails
rmp_mail_text
You can modify the text (content) of the “post rated” email with this filter.
add_filter( 'rmp_mail_text', 'blazzdev_rate_mail_custom_text', 10, 7 );
function blazzdev_rate_mail_custom_text( $message, $postID, $rating, $newAvgRating, $newVoteCount, $postTitle, $postLink ) {
return 'Post rated ' . $rating . '. Post name ' . $postTitle;
}
Code goes to your child theme’s functions.php.
Change subject for “feedback” emails
rmp_feedback_mail_subject
You can modify the subject of the “feedback” email with this filter.
add_filter( 'rmp_feedback_mail_subject', 'blazzdev_feedback_mail_custom_subject', 10, 4 );
function blazzdev_feedback_mail_custom_subject( $message, $postID, $feedback, $postTitle ) {
return $postTitle . ' has a new feedback!';
}
Code goes to your child theme’s functions.php.
Change text for “feedback” emails
rmp_feedback_mail_text
You can modify the text (content) of the “feedback” email with this filter.
add_filter( 'rmp_feedback_mail_text', 'blazzdev_feedback_mail_custom_text', 10, 4 );
function blazzdev_feedback_mail_custom_text( $message, $postID, $feedback, $postTitle ) {
return 'Comment from a visitor: ' . $feedback . ' Post: ' . $postTitle;
}
Code goes to your child theme’s functions.php.
Change thumbnail size in top rated posts widget
rmp_thumbnail_size
You can use custom image size for thumbnails with this filter.
add_filter( 'rmp_thumbnail_size', 'blazzdev_rmp_thumb', 10, 2 );
function blazzdev_rmp_thumb( $imageSize ) {
return 'large';
}
Code goes to your child theme’s functions.php.
Modify query that retrieves top rated posts
rmp_top_rated_query
This filter allows you to modify the query which retrieves top rated posts. The top rated posts widget first retrieves all posts from the website and orders them by average rating and conditions defined in the widget’s settings. So, for example if you want to display top rated posts in the current category, you can do this with this filter. The snippet below will display the top rated posts from the current category.
add_filter( 'rmp_top_rated_query', 'blazzdev_modify_top_rated_query' );
function blazzdev_modify_top_rated_query( $args ) {
if( is_category() ) {
$category = get_the_category();
if( $category ) { // category has posts
$cat_id = $category[0]->cat_ID;
$args['cat'] = $cat_id;
} else { // no posts in category
return array();
}
}
return $args;
}
Code goes to your child theme’s functions.php.
Actions
Actions provide a way for running a function at a specific point in the execution of the plugin.
Do something after rating has been submitted
rmp_after_vote
For example, clear cache etc.
add_action( 'rmp_after_vote', 'blazzdev_after_vote', 10, 4 );
function blazzdev_after_vote( $post_id, $new_avg_rating, $new_vote_count, $submitted_rating ) {
// do something
}
Code goes to your child theme’s functions.php.
Do something after rating has been submitted on AMP page
rmp_after_vote_amp
For example, clear cache etc.
add_action( 'rmp_after_vote_amp', 'blazzdev_after_vote', 10, 4 ); // after amp vote
function blazzdev_after_vote( $post_id, $new_avg_rating, $new_vote_count, $submitted_rating ) {
// do something
}
Code goes to your child theme’s functions.php.
Do something after feedback has been submitted
rmp_after_feedback
For example, save feedback to custom table etc.
add_action( 'rmp_after_feedback', 'blazzdev_after_feedback', 10, 2 );
function blazzdev_after_feedback( $post_id, $feedback ) {
// do something
}
Code goes to your child theme’s functions.php.
Printing custom content beneath all widgets (at the bottom)
rmp_after_all_widgets
This action enables you to print custom content beneath the rating widget. For example if you allow only registered users to vote, you probably want to notify them that they need to register in order to vote. See the example below:
function blazzdev_add_after_rating_widgets() {
if ( !is_user_logged_in() ) {
echo '<p>Please login to rate!</p>';
}
}
add_action( 'rmp_after_all_widgets', 'blazzdev_add_after_rating_widgets');
Code goes to your child theme’s functions.php.
Printing custom content above all widgets (at the top)
rmp_before_all_widgets
This action allows you to print custom content above the rating widget. The example below will print “Please login to rate!” before the widget.
function blazzdev_add_before_rating_widgets() {
if ( !is_user_logged_in() ) {
echo 'Please login to rate!';
}
}
add_action( 'rmp_before_all_widgets', 'blazzdev_add_before_rating_widgets');
Code goes to your child theme’s functions.php.
Printing custom content beneath the rating widget on AMP pages
rmp_after_widget_amp
This action enables you to print custom content beneath the AMP rating widget.
add_action( 'rmp_after_widget_amp', 'blazzdev_after_amp_rating_widget' );
function blazzdev_after_amp_rating_widget() {
echo 'Hello world';
}
Code goes to your child theme’s functions.php.
Printing custom content above the rating widget on AMP pages
rmp_before_widget_amp
This action enables you to print custom content above the AMP rating widget.
add_action( 'rmp_before_widget_amp', 'blazzdev_before_amp_rating_widget' );
function blazzdev_before_amp_rating_widget() {
echo 'Hello world';
}
Code goes to your child theme’s functions.php.
Printing custom content above the social icons (social widget)
rmp_before_social_icons
This hook enables you to print custom content above the social icons in social widget. Note that social widget has to be enabled for this feature to work. In the example below we add the subscribe to the newsletter CTA before the social share icons.
function blazzdev_before_social_icon() {
echo '<p><a href="https://example.com/subscribe">Subscribe to our newsletter!</a></p>';
}
add_action( 'rmp_before_social_icons', 'blazzdev_before_social_icon');
Code goes to your child theme’s functions.php.
Printing custom content beneath the social icons (social widget)
rmp_after_social_icons
This hook enables you to print custom content after the social icons in social widget. For instance, it can be used to add an additional social network/social share icon. In the example below we add the Tumblr icon with the link to our Tumblr page. The social widget has to be enabled for this feature to work.
function blazzdev_after_social_icon() {
echo '<a target="_blank" href="https://www.tumblr.com/mysite" rel="noopener noreferrer"><i class="fa fa-tumblr"></i></a>';
}
add_action( 'rmp_after_social_icons', 'blazzdev_after_social_icon');
Code goes to your child theme’s functions.php.
Printing custom content beneath the social widget
rmp_after_social_widget
This hook enables you to print custom content beneath the social widget itself. In the example below we add a subscribe link beneath the widget.
function blazzdev_after_social_widget() {
echo '<p>or subscribe to our newsletter <a href="https://example.com/subscribe">here</a>!</p>';
}
add_action( 'rmp_after_social_widget', 'blazzdev_after_social_widget');
Code goes to your child theme’s functions.php.
Printing custom content above the feedback widget
rmp_before_feedback_form
This hook allows you to print custom content above the feedback form. Note that the feedback widget has to be enabled for this feature to work. In the example below we add a contact us link above the feedback form.
function blazzdev_before_feedback() {
echo '<p>We\'d love to hear why you didn\'t like this post. Contact us <a href="https://example.com/about">here</a>!</p>';
}
add_action( 'rmp_before_feedback_form', 'blazzdev_before_feedback');
Code goes to your child theme’s functions.php.
Printing custom content beneath the feedback widget
rmp_after_feedback_form
This hook allows you to print custom content beneath the feedback form. Note that the feedback widget has to be enabled for this feature to work. In the example below we add a link to the “about us” page beneath the feedback form.
function blazzdev_after_feedback() {
echo '<p>or learn more about us <a href="https://example.com/about">here</a>!</p>';
}
add_action( 'rmp_after_feedback_form', 'blazzdev_after_feedback');
Code goes to your child theme’s functions.php.
Adding additional information to the Top Rated Posts widget
rmp_before_widget_title
The top rated posts widget shows the top rated posts with the following information: featured image, visual rating and the title. If you want to add additional information such as author name, published date, modified date etc. you can do so with this filter. The example below shows how to add the published date.
function blazzdev_trpw_published_date( $postID ) {
$date = get_the_date( '', $postID );
echo '<p>Published: '. $date . '</p>';
}
add_action( 'rmp_before_widget_title', 'blazzdev_trpw_published_date' );
Code goes to your child theme’s functions.php.
Global Functions/Methods
The Rate my Post WordPress plugin allows you to build custom solutions on top of it. With the global functions you can easily get information such as vote count, average rating etc. for use globally on your website.
Get the average rating
rmp_get_avg_rating( $postID )
This function returns the average rating for the specified post. If $postID is not provided, it returns average rating for the current post. In case of no ratings the function returns 0.
rmp_get_avg_rating( $postID )
Get the vote count
rmp_get_vote_count( $postID )
This function returns the vote count for the specified post. If the $postID is not provided, it returns the vote count for the current post. In case of no ratings the function returns 0.
rmp_get_vote_count( $postID )
Get the visual rating
rmp_get_visual_rating( $postID )
This function returns visual rating (stars or whichever icon you chose in the options) for the specified post. If the postID is not provided, it returns visual rating for the current post.
rmp_get_visual_rating( $postID )
Get the top rated posts
rmp_get_top_rated_posts( $max_posts, $required_rating, $required_votes )
This function returns an array of top rated posts with titles, urls, featured images, average ratings and vote counts. It accepts three arguments: number of posts, the required minimum average rating and the required vote count. With this function you can build your own top rated posts widget.
rmp_get_top_rated_posts( $max_posts, $required_rating, $required_votes );
Javascript Functions/Methods
The plugin exposes RateMyPost object globally.
Re-init rating widgets
RateMyPost.re_init()
Calling this method will re-init rating widgets. Rating widgets are initialized on page load which is a problem if you want to utilize them with various infinite scroll plugins or within certain types of popups where the widget is not in the DOM on page load. The example below, shows how to re-init widgets with an infinite scroll plugin.
jQuery(function($){
$('body').on( 'alnp-post-loaded', function( e, params ) {
RateMyPost.re_init();
});
});
Code goes to your custom Javascript file.
Re-init a single rating widget
RateMyPost.init_single_rate_my_post(postID, ajaxLoad)
Calling this method will re-init a single rating widget. It works similar to RateMyPost.re_init(); method but is lighter because it allows you specify specific rating widget. Furthermore, it also allows you to ajax load results for whichever rating widget you want. See below.
$( document ).ready(function() {
// ajax load results for widget with post id 939
RateMyPost.init_single_rate_my_post(939, true)
});
Code goes to your custom Javascript file.
CSS Snippets
The style can be further adjusted with custom CSS. Below are some CSS snippets which you can use.
Hide the plugin for users who are not logged in
If “Only logged in users can vote” feature is enabled, you can hide the plugin for users who are not logged in. See example below.
.rmp-rating-widget--no-privilege {
display: none;
}
Code goes to your child theme’s style.css.
Hide the rating widget if user already rated the post
With the snippet below the rating widget won’t show if the user already rated the post.
rmp-rating-widget--has-rated {
display: none;
}
Code goes to your child theme’s style.css.
Hide results from archive pages where the post hasn’t been yet rated
With the snippet below you can hide the ratings shown next to post title on archive pages for posts that haven’t been yet rated.
.rmp-archive-results-widget--not-rated {
display: none;
}
Code goes to your child theme’s style.css.
Style the submit rating button
The submit rating button is displayed if “prevent accidental votes” feature is enabled. It can’t be styled in the customize section, but you can easily style it with custom CSS.
button.rmp-rating-widget__submit-btn.rmp-btn {
background-color: red;
}
Code goes to your child theme’s style.css.
Style the submit feedback button
The submit feedback button can’t be styled in the customize section, but you can easily style it with custom CSS.
button.rmp-feedback-widget__btn.rmp-btn.rmp-btn--large {
height: 70px;
padding: 10px;
width: 250px;
margin: 1em auto;
background-color: #FEB1C0;
border: none;
border-radius: 3px;
text-transform: uppercase;
letter-spacing: 0.5em;
}
button.rmp-feedback-widget__btn.rmp-btn.rmp-btn--large:hover {
cursor: pointer;
background-color: blue;
}
Code goes to your child theme’s style.css.
Hide the Google ReCaptcha badge (only if ReCaptcha is enabled)
Note that you must include link to the terms of use and the privacy policy according to the reCAPTCHA v3 Terms of Use.
.grecaptcha-badge {
display: none;
}
Code goes to your child theme’s style.css.
Change the color of empty stars
With the snippet below we are changing the color of empty stars in rating widget to #e6e6ff.
.rmp-icon--ratings {
color: green;
}
Code goes to your child theme’s style.css.
Change text area width in feedback widget
With the snippet below we are making the text area in feedback widget take 100% of the page width.
.rmp-widgets-container.rmp-wp-plugin.rmp-main-container .rmp-feedback-widget__input {
min-width: 100%; /* Width of text area */
}
Code goes to your child theme’s style.css.
Custom Templates
Rate my Post allows you to completely customize the plugin with custom templates. To use a custom template create rate-my-post folder in your child theme or theme and copy the following templates from the plugin to the folder:
- \wp-content\plugins\rate-my-post\public\templates\rating-widget.php (template for rating widget)
- \wp-content\plugins\rate-my-post\public\templates\results-widget.php (template for results widget)
- \wp-content\plugins\rate-my-post\public\templates\amp-rating-widget.php (template for rating widget on AMP pages)
- \wp-content\plugins\rate-my-post\public\templates\amp-results-widget.php (template for results widget on AMP pages)
- \wp-content\plugins\rate-my-post\public\templates\visual-rating.php (template for visual rating which is used for results widget, top rated posts widget and to display rating on archive pages)
Then you can simply modify these templates as you wish and you will not lose changes after the plugin updates.
Troubleshooting
While Rate my Post plugin works with most themes and plugins, it’s impossible to ensure 100% compatibility, not least because many WordPress websites use custom solutions. Below are the most common fixes.
The “Add rating widget to all posts” feature is not working
In case that that the rating widget is not inserted automatically I recommend using shortcodes instead. If this sounds like too much work you can always include the widget directly in the template with the following snippet:
<?php echo do_shortcode('[ratemypost]'); ?>
The best place to add this snippet is under the while loop in the single.php file of your theme (/wp-content/themes/yourtheme/single.php).

I’m getting the invalid WP Token (nonce) error
Nonces are a WordPress security feature and due to their implementation, they won’t work on pages that are cached for more than 24 hours. If you are getting the “invalid nonce error” when you submit a rating, it’s likely that the page has been cached for more than 24 hours. Most caching plugins by default don’t cache pages for more than 24 hours, exactly because of nonces. The exception is the LiteSpeed Cache WordPress plugin. If you are using the LiteSpeed cache plugin you should set TTL to 86400 under “cache” as shown below.

How to fix the invalid WP Token (nonce) error?
- The easiest way to fix the problem is to set the page cache expiry to less than 24 hours in your cache plugin. As explained above most cache plugins by default have cache expiry set to less than 24 hours in order not to cause issues with nonces.
- Alternatively you can increase the nonce lifespan to match you cache expiry interval. The code below changes nonce lifespan to one week.
add_filter( 'nonce_life', function () { return 168 * HOUR_IN_SECONDS; } );
Code goes to your child theme’s functions.php.
I want to add the rating widget to Elementor template
Calling the shortcode [ratemypost] in Elementor template will not work because Rate my Post will have trouble recognizing which post is being rated. A workaround is required to call the shortcode in Elementor template. First you should install the ACF WordPress plugin and then follow these steps:
- Create ACF Field
- Set [ratemypost] as default
- Add value of ACF field as dynamic content to a text field in the template
Dots are shown before the stars
If dots are shown before the stars in the rating widget, this snippet typically helps.
.rmp-widgets-container.rmp-wp-plugin.rmp-main-container .rmp-rating-widget__icons-list__icon:before {
content: '';
}
Code goes to your child theme’s style.css.
Stars are shown vertically
If stars are shown vertically, this snippet typically helps.
.rmp-widgets-container.rmp-wp-plugin.rmp-main-container .rmp-rating-widget__icons-list__icon {
display: inline-block !important;
width: auto;
}
Code goes to your child theme’s style.css.
AMP Compatibility (BETA)
Since version 2.3.0 the plugin is AMP-compatible and since version 3.3.0 it comes with style. Currently AMP and AMP for WP plugins are supported. It will not work with other plugins.
To add rating/result widgets to your AMP pages simply enable AMP compatibility mode in the advanced settings. If you are using AMP for WP plugin an extra step is required. See below.
If you are using AMP for WP plugin, you will have to disable form sanitization as the plugin automatically strips forms out of the document. A tutorial on how to do this is available here. If you are having trouble disabling the sanitizer, you can simply download and install this plugin (see code on GitHub) which will automatically disable the sanitizer in AMP for WP plugin.
Tutorials
Extras
Did you make a tutorial? Drop me a line on [email protected].
Hi sir thank you for your plugin, it is nice
I wish to ask you how to get users` rating for one post , with their comment,
in analytics section I can find user`s rating, so how to display it as result star in comments of single post
Hi there,
I’m not sure I completely understand your question. Feedback is private and visible only to logged in users (admins, editors, authors etc.).
Regards,
Blaz
Hello, Thanks for the damn good plugin. I still have a question. How can I integrate the result between the metadata? Which PHP value…
***) ***
…is required for this? Thank you very much, best Regards, Rene from Berlin GERMANY
Hi Rene,
where exactly would you like the result to show? 🙂
There is a global function which returns the average rating: rmp_get_avg_rating( $postID )
Regards,
Blaz
Hello! Thanks for the plugin.
Is there any way to have only the rating stars (not the result but the stars used to vote)?
I mean, only the stars without all structure around?
We could use a lot “display:none” on the paragraph before and after but it’s not the proper way.
Any idea? 🙂
Thank you!
Hi Gilbert,
that’s an option, but you can also just leave the fields empty in the customize section (title, subtitle). If you decide for this I recommend switching on “Remove headings in rating widget” in the advanced settings.
Regards,
Blaz
Hey Blaz, thanks a lot for the cool plugin!
A quick question though – during setup a lot of dummy data was generated for the pages on which the plugin shortcode was tested. How can we clear/purge this data besides going to MySQL?
Hi Andy,
I see two options:
1. You enable “Delete all plugin data on uninstall” in the advanced settings, delete the plugin and reinstall it. The problem here is that you will also loose all settings etc. :/
2. You first comment out or delete the following lines in unistall.php
delete_option(‘rmp_options’);
delete_option(‘rmp_customize_strings’);
delete_option(‘rmp_version’);
delete_option(‘rmp_security’);
and then you follow the first option 🙂 This way the settings will not be deleted but all other data will be. I haven’t tested this, so I recommend you backup the database before, just in case.
Regards,
Blaz
Hi, Blaz. I like your plugin.
I ran into a problem. The [ratemypost-result] shortcuts do not work if you put them in the file styleblog\template-parts\content.php of the Styleblog theme: https://wordpress.org/themes/styleblog/
What can I do? How to fix this problem?
Hi Michael,
did you add the shortcode like this:
echo do_shortcode('[ratemypost-result]');
Anyway, it would be better to add the shortcode to single.php. Try that too and let me know if you need further assistance.
Blaz
HI
how can I hide the ‘Rate my post’ section in the visual editor? I don’t want that a contributor can rate his own text (same issue in the preview, contributor can rate his text)
thanks
ad
Hi Andrea,
if you are referring to meta box in the post editor, a contributor cannot manipulate ratings. The meta box is there, but on save it will return a warning about the permissions. You can set the permissions under security -> “ratings manipulation requires a role of”.
Regards,
Blaz
hello,
How can I filter top rated post on the basis of specific post type,
i would like to show top rated posts of ‘movie’ post type only,
which is custom post type named ‘movie’.
Thank you
Hi Gautam,
there is unfortunately no easy way to do this at the moment. I will add a filter in the next version, but the next version will most likely be a major update (version 3) and thus it might take a while. I’ll keep you updated.
Regards,
Blaz
Thanks for help, Blaz. I added echo do_shortcode(‘[ratemypost-result]’) in single.php. It’s worked.
But I need it to work at index.php.
It doesn’t work.
Michael,
you mean on the front page? That will only work if your website uses static page under Settings -> Reading Settings -> Your homepage displays. That’s because the ratings are saved in post meta and thus only post types can be rated.
Regards,
Blaz
I am inspecting a post with ratings enabled, but i cannot see the post meta for ratings.
What is the name of the post meta tag they’re saved under?
Hi there,
The meta key is rmp_avg_rating.
Regards,
Blaz
thanks very good
i try to use [ratemypost-result] and [ratemypost-result id=”1″] shortcode in Blog post exerp. Idea that visitors could see star rating for each blog post in archive page. But ratings dont show just emptu stars that lookes like there are no ratings. When you click post open then you see ratings as you should.
is there something that i am missing here?
Hi Lauri,
do you by any chance have “ajax load results” enabled? With “ajax load results” enabled only one instance of rating/results widget can be embedded on a single page. This limitation is stated in the repo on GitHub. But it should work fine without ajax load results. Otherwise send me a link to the website so I can check out what’s causing the issue.
Blaz
I also have this issue and don’t quite understand the solution.
Actually I can’t get any shortcode for this to work in excerpt. I’m using oxygen easy post.
Hi there,
I’m not familiar with the oxygen easy post and thus it’s best to ask them about the excerpt/shortcode compatibility.
Regards,
Blaz
I’m having this same issue. Also using elementor. I am able to get the star rating results to render correctly when I place the shortcode in the post itself but not on the main page. This issue seems to be persisting. I disabled the Elementor plugins, and changed to a different theme and still got the issue. I am sure I am using the correct post id, but that doesn’t seem to do anything.
It seems that your plugin isn’t capable of rendering star ratings on pages or posts independent of those blog posts. I’ve tried everything I can think of to isolate the issue but to no avail. I love your plugin though and would love to use it. Any idea what might be causing this?
Hi Aaron,
To display ratingor result widget in a post for some other post, you should use shortcodes [ratemypost id=”1″] and [ratemypost-result id=”1″] where id specifies the ID of post for widgets.
Regards,
Blaz
Wel I got stars showing in Archive page. But I have created normal page via Elementor and it is kind of Archive page and there those stars don’t show. I try to use this [ratemypost-result id=”1″] in blog post Excerpt field and then I paste blog post id. I also tried to add same shortcode just for normal page and it did not show result of that certain blog id.
I can send link to site and access via email.
And you are inserting the right post id? Send me link to the website via email.
Blaz
Hi There – I’m trying to remove the Average Rating and Vote Count but it doesn’t seem possible. I’ve toggled on off these two settings: Add rating widget to all posts and Add results widget to all posts – but nothing seems to work. Help?
Hi Debbie,
you can hide average rating from rating widgets in the settings. To hide vote count, you need to create a custom template where you remove the vote count information. More about custom templates above in the documentation.
Regards,
Blaz
Hello,
Thanks for the plugin.
I would like to remove in an archive page the result, I succeeded for one page. Now, I would like to remove it on a second page but as soon as I add the code a second time with the other page, there is an error. I’m not very good at coding, what do we do?
Hi Thomas,
I don’t completely understand what are you trying to remove. Results on archive pages are shown only if that is enabled in the settings. What code are you adding to the pages?
Blaz
I added this code:
function blazzdev_exclude_author( $content ) {
if ( is_category( ‘category’) ) {
return false;
} else {
return $content;
}
}
add_filter( ‘rmp_archive_results’, ‘blazzdev_exclude_author’ );
With this code, I managed to hide the results in one archive page. I would like to hide the results in second archive page, what should be added to the code?
How can i pull top rated posts and top custom posts separately? I need to pull different results in the sidebars for custom posts. At the moment it pulls all the content.
Hi Alex,
I’ll add some filters there in version 3.2.0 which is already in the development. Since this is a bigger update, I can’t give you a release date just yet, but I guess it will be released by the end of the month. In the meantime you can try modifying the top_rated_posts method in order to achieve the desired functionality.
Regards,
Blaz
Quick question about analytics – i thought ‘total votes’ was an accumulative figure of all votes made per post. But now that we’re live and running a competition this doesn’t seem to tally – rather it looks like it is the total no. of votes by that user on a post, which is confusing as I thought it limited it one post vote per user.
If you could expand on how ‘total votes’ is calculated that would be great?
Hi James,
the “total votes” in the analytics section displays the new vote count after the vote was submitted. So, if you use search in the analytics table to only show a single post, the “total votes” should be decremented by one from top down. For example 20,19,18 etc. However, there is an exception. If you reset/manipulate the votes in the backend, you will see a change in the total votes also in the analytics table.
Let me know if you have more questions.
Regards,
Blaz
Blaz,
I’ve just spotted where my confusion is coming – the analytics page on the backend only shows 100 most recent votes. We’ve had way more – hence I couldn’t see the votes to reconcile the number.
Is there anyway to view all the votes by username?
James
That is correct James. You can force the analytics table to display more actions by modifying “admin/class-rate-my-post-admin.php” on line 709:
$analytics_data = $wpdb->get_results( “SELECT * FROM $analytics_table ORDER BY id DESC LIMIT 100” );
Replace 100 with the number of actions you want to display 🙂
Regards,
Blaz
Hello how can I export or get a rating metric? I activated via shortcode and would like to see an overview of the grouping of these votes or the option to export csv. How can I do this?
Hi Jessica,
csv export is at the moment unfortunately not possible. Nevertheless, the feature is on the roadmap and is coming in future versions.
Regards,
Blaz
Hi,
Any update about exporting to CSV?
Thanks a lot for time.
Regards,
JL
Hi there,
At the moment I unfortunately don’t have time to add such a feature. But contributions are welcome https://github.com/blaz-blazer/rate-my-post 🙂
Blaz
I would like to use a custom image or FontAwesome icon in place of your Stars. I read in the documentation that “you can use your own icons (via background-image property) or whichever icon from FontAwesome,” but I could use some additional guidance.
When I use a FontAwesome icon, there is no hover image — just a box (and the same box appears when I choose a rating). What am I doing wrong?
Can you give a bit more detail about using the background-image property to display a custom icon?
Thanks — great plugin.
Hi David,
thanks for pointing this out. I forgot to update this section when version 3 was released. It’s updated now. Something like this should work:
style.css:
[class^=”rmp-icon–“], [class*=” rmp-icon–“] {
font-family: ‘Font Awesome 5 Free’!important;
}
functions.php:
function blazzdev_custom_class( $class ) {
return $class . ‘ fas fa-car’;
}
add_filter( ‘rmp_rating_icon_class’, ‘blazzdev_custom_class’ );
Best regards,
Blaz
Hi. I am also looking for information on this. Would it be possible to give an example of using the background-image property to use your own svg for an icon vs. the font awesome icons?
Thanks
Hello,
Thanks for this great job, very usefull
I am testing, how can delete test votes.
Thank you and Regards
Hi Maurice,
I’m glad to hear that you like the plugin. Deleting all votes at once will be an option in the upcoming 3.2.0 version. At the moment, you unfortunately have to reset ratings for each post in the post editor: https://blazzdev.com/wp-content/uploads/2019/09/Rate-my-Post-Ratings-can-be-changed-in-the-backend-1440×796.jpg
Regards,
Blaz
Is it possible to make a function for re-voting?
Hi Ruslan,
if you enable “delete cookie on page load” and disable double vote prevention via IPs re-voting should be possible.
Blaz
You can do so to re-vote the number of assessments did not change.
Ah, yeah that is not yet possible. All votes are final, but you can enable “prevent accidental votes” in case you have a feeling you’re getting such votes.
Blaz
I hope that such a function will appear.
Thank you for the great plugin!
Just a note of appreciation for the terrific plugin.
This rating plugin is totally awesome! Impeccably coded, documented and cared for. Really, really, great stuff!! Thank you, I’m a big fan!
Thanks! I’m glad to hear that!
Blaz
Hi:
Thanks for you plugin 🙂
I would like to know if it is possible show the top rated posts just in one page.
I tried to add rmp_get_top_rated_posts( $max_posts=5, $required_rating=4, $required_votes=1 ); in a code module of my page, but it is not working.
I’m sure I am missing something.
Thanks!
Hi Sira,
if you want to show top rated posts in a widget only on one page you can utilize the rmp_top_rated_query filter like this:
add_filter( ‘rmp_top_rated_query’, ‘blazzdev_modify_top_rated_query’ );
function blazzdev_modify_top_rated_query( $args ) {
if( ! is_page( 677 ) ) {
$args[‘post_type’] = array(‘rmp-dummy-post’);
$args[‘posts_per_page’] = 1;
return $args;
}
return $args;
}
The top rated posts widget must be added under appearance->widgets for this to work.
If you need a custom solution you can use the rmp_get_top_rated_posts function but this does require some knowledge of PHP.
For starters you can do something like this:
$top_rated_post = rmp_get_top_rated_posts( 5, 4, 2 );
print_r($top_rated_post);
Then you do whatever you have to do with the data 🙂
Regards,
Blaz
Thanks, Blaz, finally I realized I can do it with a widget.
Very nice plugin, have a nice day
Hi,
since a few days I have some issues in the Google Search Console / Structured Data tests…
Let me start from the beginning… I used my own functions.php to adapt the structured data (taken from your docs at section “Changing the structured data”).
The GSC/SD issues are:
1) Rating is missing required best and/or worst values
2) Value in property “ratingCount” must be positive
The 2) GSC/SD issues only appear on blog post, where no one did a rating. So “ratingCount” = 0 and GSC/SD tells, that 0 is not positive…
The 1) GSC/SD issue I could solve by adding
“worstRating”: “1”,
in your code.
Do you have a good idea to solve the 2) issue?
[email protected]
Hi again,
some additional question. Do you have functions available such as:
-rmp_get_best_rating();
-rmp_get_worst_rating();
?
[email protected]
If this refers to structured data, these are anyway static values: Worst rating is always 1 and best ratings is always 5. Unless you have rmp_max_rating filter in place 🙂
Blaz
Hi Alex,
since version 3.2.0 the rmp_structured_data filter runs also if the post hasn’t been yet rated. So, you need to check whether the post has been rated before outputting the structured data. You can put something like this at the top of the function:
$voteCount = rmp_get_vote_count();
if( !$voteCount ) {
return “”;
}
Regards,
Blaz
Hi Blaz,
Congrats for this great plugin! I’m testing it.
But I do have a little question: I don’t see “How To” in the list “Type of structured data for rich snippets”… However, it exists according Google Guidelines. Is there any way to choice “How to” ?
Thanks for your help
Best
JC
Hi JC,
HowTo is a very specific schema type which requires a lot of post-specific information. I’m developing a standalone plugin for HowTo schema types which will integrate nicely with the upcoming Rate my Post PRO. More about this here.
Regards,
Blaz
Congratulation for such a useful plugin. I have question, can we customize social widget icons. in customize section we can only adjust the size of icons. can we change the color or make them square.
Hi Bridges,
the following settings are related to the color of icons: Results Color, Hover Color, Rated Color and Highlight Color. You can use different icons by utilizing custom templates (see above) but this does require some coding skills.
Regards,
Blaz
Hi Blaz,
I am trying to edit the results to appear as Average score: x Number of votes: x beneath the stars, but can’t get this to work? It will only show me the Average score and number of votes is left blank?
Also, I have selected NO for tracking IP address but it still won’t enable me to vote again on the same page?
Can you advise?
Many thanks,
Sally
Hi Sally,
try inserting Average score: {{avgrating}} Number of votes: {{votecount}} in custom results text in the “Customize” section.
The plugin also uses cookies to prevent double votes. You can disable cookies in the “Settings” under “Delete cookie on page load”. The page has to be reloaded before you can vote again.
Regards,
Blaz
HI Blaz!!
Thanks for your app. But I am not able to put the stars on a specific site on my website. I would like you to see this link: [url] and see if you can tell me how to put the stars under each type of mattress. It would be a great help! thanks for your time
Hi Jose,
for this you’ll need the “custom rating widgets” feature, which will be available in the PRO version. More about this here.
Regards,
Blaz
Hi, Blaz: First of all, thank you for your plugin.
I want to create 2 sidebars: one must show the top rated posts of a single post category, and the other must show the top rated posts among the rest of the categories.
I don’t know if it is possible; if it is, please explain it to me knowing I’m not a developer but a designer 😉
Thank you in advance and regards
Hi Sira,
this is unfortunately not possible at the moment. You can create either the first or the second, but not both together 🙂 I mean you could create your own widget and use data from RMP, but I guess this would be quite some work.
Blaz
Thanks, Blaz.
I guess I will solve it with another plugin besides yours, so yours will work with the single category and the other wiht the rest of the categories…
Best 🙂
The plugin is perfect! I’m just confused as to how I can manage the ratings. I rated one of my own articles 1/5 to test it out and I can’t seem to be able to delete it although I saw somewhere above that this functionality was apparently made available in version 3.2.2?
Thanks anyway, this system is grand!
Hi there,
you can manage ratings in the post editor at the bottom. See here.
Regards,
Blaz
Hello, I have been using this plugin for about 6 months, the truth in design and options is excellent, but I have found a huge flaw regarding the optimization of web performance.
What happens and I have already done all the tests, when I do not have the plugin activated my web loads fast and has a good score in PageSpeed and Gmetrix for example, but when I activate the plugin my web goes slow and I get some alerts from the Recaptcha and Googlecomo for example:
[url]
[url]
[url]
Google CDN
Other Google APIs / SDKs
Hi Ronny,
for testing page speed I recommend using Pingdom. I do regularly test page speed difference with plugin enabled/disabled and the impact is minimal – a couple of milliseconds.
Regards,
Blaz
hello
I wish I could edit the widget the top rated posts,
just changing the sizes and potion is possible?
Hi Nicolas,
that’s possible to some extent – you can of course use custom CSS and there is the “rmp_before_widget_title” hook where you can add custom content (more in the documentation).
Regards,
Blaz
Blaz,
I like how it is stylized this comments section of you website.
Is there any plugin or such a thing?
Hi there,
unfortunately not. It’s a part of the custom theme 🙂
Blaz
Hi – love this! I see it can be restricted from certain post categories. What is the code to include ONLY in a certain post category? (and sub-categories of main category)
Hi Charles,
you should use the rmp_display_rating_widget and rmp_display_results_widget filters.
add_filter( ‘rmp_display_rating_widget’, ‘blazzdev_show_rating_widget’ );
function blazzdev_show_rating_widget() {
if( ! in_category( ‘your-category-slug’ ) ) { // will be displayed only in this category
return false;
}
return true;
}
Something like this should work just fine 🙂
Regards,
Blaz
Thank you very much for your work. I need to use it for a film festival website where the public can rate the film after the session ends. Only this. Can I configure so that the button is activated at a specific time of a certain day and deactivated when I need it? A hug!
Hi Jose,
I guess you could do this with javascript/jquery. Something like this: https://stackoverflow.com/questions/15122526/disable-button-in-jquery
Regards,
Blaz
Hi!
I wanted to see if it was possible to email the post author when feedback is submitted rather than the admin.
It seems like this code could be modified to do so, but I am a little lost. Any help is appreciated!
add_filter( ‘rmp_mail_address’, ‘blazzdev_change_rmp_email’ );
function blazzdev_change_rmp_email( $email ) {
return ‘[email protected]’;
}
Hi Matt,
It’s possible. Something like this should work 🙂
add_filter( ‘rmp_mail_address’, ‘blazzdev_change_rmp_email’ );
function blazzdev_change_rmp_email( $email ) {
$email = get_the_author_meta(‘user_email’);
return $email;
}
Regards,
Blaz
Hmm, I’m not having luck with that. I tried changing the apostrophes(‘) to be plain text as that seemed to be an issue, but not having any luck.
I read another post about the get_author_email_meta function maybe not working in a loop….? It suggested another method that I tried below, but it didn’t work either.
add_filter( ‘rmp_mail_address’, ‘blazzdev_change_rmp_email’ );
global $post;
$author_id=$post->post_author;
function blazzdev_change_rmp_email( $email ) {
$email = get_the_author_meta( ‘user_email’, $author_id );
return $email;
}
Matt, you shouldn’t be calling add_filter in the loop. Place the following outside the loop:
add_filter( ‘rmp_mail_address’, ‘blazzdev_change_rmp_email’ );
function blazzdev_change_rmp_email( $email ) {
$email = get_the_author_meta(‘user_email’);
return $email;
}
Blaz
Still not having luck with this. Can anyone confirm its working?
The code below works:
add_filter( ‘rmp_mail_address’, ‘blazzdev_change_rmp_email’ );
function blazzdev_change_rmp_email( $email ) {
$author_id = get_post_field (‘post_author’, $_POST[‘postID’]);
$email = get_the_author_meta( ‘user_email’,$author_id );
return $email;
}
Hello!
How to remove rate my post in homepage, weather in WordPress or in elementor how can I delete it. Please help me.
Yeah got.
Is it possible to make the feedback email that gets sent html rather than plain text?
Hello I’ve set the structure data for local business and gotsome posts ad pages rated. After update I don’t see the stars appeared in google search under my page.
Is there anything else that has to be done in order to get ratings snippet visible in google search?
And following that
If I rate the page but the visibility of results is not set on the page, then is this page still eliglible to have snippet with stars visible on google?
Hi Dan,
You should first verify that the structured data is valid. If it is, I think it’s better to ask these questions on Google Help Community forum.
Regards,
Blaz
Great plugin, thank you!
Is it possible to disable backend rating manipulation for the author-role (even for his/her won posts?
“… for his/her *own* posts?”
Hi Oliver,
Yes, you can do this in the security settings. Simply select that only admin or editor can manipulate posts in the backend.
Regards,
Blaz
Hello,
I don’t understand why when I have an article that has had votes for a few months, it still does not appear in google searches?
Thanks
Hi Thomas,
Check if the schema markup gives any errors. If there are none, you can ask Google Help Community for advice.
Regards,
Blaz
Hello.
“rmp_get_vote_count( $postID )” and “rmp_get_avg_rating( $postID )” were not updated in real time after the voting.
Hi there,
This is not the intended functionality of these functions. They only retrieve the relevant data.
Regards,
Blaz
Hello!
It is suggested that unvoted and voted stars display different colors in order to distinguish whether they have been voted or not.
The stars switch back to showing average rating after post is rated, so that’s not possible.
Hi Blaz,
I’ve been adding comma separated post IDs in the Exclusion box, but when saving settings after the last one I added (19th ID), the invalid nonce! message came up.
Is this because there is a restriction as to how many posts can be excluded, and if so, can you set it to unlimited, please?
The reason is that I’ve migrated to a new Recipe plugin that has its own built-in rating facility. As I import each old recipe and make it live, I want to remove the Rate my Post widget for that post/recipe. I don’t want to show two ratings calls at once.
There will be hundreds of posts in the exclusion eventually.
Thank you for a wonderful plugin!
Hi Antya,
There is no restriction on the number of excluded IDs. The invalid nonce error is typically related to caching. Do you use any caching in the backend?
Regards,
Blaz
Hi Blaz,
thank you for your reply. I have indeed discovered that server caching was the culprit.
All good now.
Thanks again and Best wishes.
Hello! Thank you for your plugin, it is very convenient and functional!)
But unfortunately I recently encountered a problem that the plugin got into my amp pages and of course google search console swears at uncorrected data.
Example:
{url}
This page has the code:
” ”
which Google swears at.
Please tell me if it is possible to make it so that on all pages of my site at the address like /amp/* the plugin is not loaded.
Hi there,
You can disable AMP compatibility mode in the settings. This will prevent the plugin from showing rating widgets on AMP pages.
Regards,
Blaz
Hi Blaz! Is this plugin compatible with AMP?
Hi Inma,
Yes, the plugin is AMP-compatible. However, on AMP pages only a minimalistic rating widget is supported. Feedback widget, social widget etc. are not supported.
Regards,
Blaz
Hello.
I hope I can customize “rate-my-post-top-rated-widget.php” : )
Thanks.
Haha, by the way, I would like to know how the “post author” next to the name is achieved? Please.
Hello : )
Following the “Modify query that retrieves top rated posts” method above, there is no change, it is still the global ranking.
Yeah! Problem solved!
add_filter( ‘rmp_top_rated_query’, ‘blazzdev_modify_top_rated_query’ );
function blazzdev_modify_top_rated_query( $args ) {
if( is_singular() ) { //Modified here!!!
$category = get_the_category();
if( $category ) { // category has posts
$cat_id = $category[0]->cat_ID;
$args[‘cat’] = $cat_id;
} else { // no posts in category
return array();
}
}
return $args;
}
Thank you for developing the plugin, it’s super great!
Hello Sir,
I am having an issue with icons showing the resulting rating as it’s size is very low. I am using a short code -[ratemypost-result] and how can I increase its size.
Thank you in advance.
Hello
My problem is that I have installed it on my wordpress and it does not react. If you pass the mouse over the stars they change color but when marking a score it does not do any action afterwards.
Is it possible that there is some incompatibility with some plugin like WP Rocket, Autoptimaze?
If you want I can tell you the theme that I have installed. I really like the plugin and I would like it to work well.
Hi Juanjo,
The best way to figure out what’s causing the issue is to follow these steps: https://wordpress.org/support/topic/sticky-read-before-posting-%e2%9a%a0%ef%b8%8f/
The plugin is tested with many popular WordPress plugins but of course I can’t ensure compatibility with every plugin/theme 🙂
Regards,
Blaz
Hi,
I have a blog website that share investment knowledge. And I use this plugin to let user vote for each article.
But I want this rating to display on Google SERP (rich snippet).
How can I do so? Is this plugin support? Do I need to get a paid plan?
Hi Bill,
You don’t need a paid plan for rich snippets. You can read more about rich snippets here.
Hi,
I just realized a problem with the results. Users that have never rated the page, see the thank you message. Is there a way to show the results only when the readers click on the stars?
You can see one example here: [url]
Thank you!
Hi Valérie,
I checked your website and everything seems to work fine. Currently there is no out of the box option to hide the results for people who haven’t yet voted.
Regards,
Blaz
Hi Blaz !
Thanks for your plugin 😉
I use the rating widget for blog posts and disabled structured data.
I am now creating a “product” section, and I wish to enable Product Rating, so they appear in Rich Snippets.
How can I have on post type without structured data (posts in my case), and the other with structured data ?
Is there a possible arg to the shortcode ?
Many Thanks in advance
Hi there,
That’s unfortunately only available in the PRO version. There you can choose structured data type in the post editor for each post.
Regards,
Blaz
Hi Blaz,
I have a website with woocommerce and I have included a woocommerce shortcode in my home page (not the shop page) so that it shows some products there.
I’m going crazy because I want the star ratings to appear in each product of the homepage, just like they appear in the archive pages.
Can you please tell me how to do it?
Thank you very much!
Hi Tina,
I’m afraid this is not possible out of the box. I don’t know how you are adding the products on the front page but RMP allows you to retrieve visual rating, average rating and vote count for each posts with the following functions:
rmp_get_avg_rating( $postID )
rmp_get_vote_count( $postID )
rmp_get_visual_rating( $postID )
You basically need to add these functions to the template for products, but this does require some knowledge of PHP.
Best regards,
Blaz
Hey Blaz,
I was wondering if it is possible that after someone submits a rating, the class “.rmp-rating-widget–has-rated” can automatically be added without the need to reload the page at first. Because the stars just go back to empty after submitting the form and to see my rating I have to reload at first…
Besides that… Great Plugin!
Hi Julian,
That class is added based on the presence of cookie. I could add another class after a star is clicked. I think it’s a good idea. Nevertheless, the stars shouldn’t go back to empty once the rating is submitted. Is it possible that something is interfering with the plugin?
Regards,
Blaz
This may be exactly what I’m looking for. However, have you tested with a Network-enabled (i.e. Multisite) installation? When I installed the plugin on my Network site, the widget appears and functions correctly on site #1. However, on all other sites, while the widget does appear (stars are visible and clickable), they do not show any of the surrounding/customizable text (“How useful was this post? Click on a star to rate it!”). It just shows “null”. Interestingly, clicking a star DOES appear to save the rating on the backend, because stats/analytics specific to the site are available on that site’s backend. So, it does appear to partially work in a Network site, but the customizable text needs to be looked at.
Hi Dave,
I haven’t tested the plugin on multisite. However, I have this on the roadmap, but right now I’m unfortunately a bit short on time 🙁 I hope to look at this soon.
Regards,
Blaz
Hi,
thank you for this amazing plugin, I just installed and made all settings properly but when I check it I noticed non logged users cannot vote, only logged users can vote despite of proper settings, what can be reason? Can you help me pls? My web : [url]
Hi there,
Please follow the steps here: https://wordpress.org/support/topic/sticky-read-before-posting-%e2%9a%a0%ef%b8%8f/
Regards,
Blaz
Hi,
I’m trying the code to filter the top rated posts widget by category, but it’s still displaying all posts. I also tried the solution someone mentioned in the comments here, but it still isn’t displaying posts by category. Not sure if this could be because I’m using a template on categories?
Thanks
Cheryk
Hi Cheryl,
The rmp_top_rated_query should work fine. Did you clear the cache after adding the code snippet?
Regards,
Blaz
Hi,
Sorry it’s taken so long to respond. It’s obviously not a priority issue for me.
However, the code here is not returning top rated posts from only the category of the category page the widget is loaded on.
I’ve tried the alternate snippet in the comments as well but neither works.
Could this have something to do with using it in a category template?
Thanks
Hi Cheryl,
$cat_id = $category[0]->cat_ID; in the snippet above is responsible for retrieving the category ID of which the top rated posts should show. You can do print_r($cat_id); below the $cat_id = $category[0]->cat_ID; to see what ID it’s returning and then modify that part of the code accordingly. This does require some PHP knowledge though. Hope it helps.
Regards,
Blaz
Hi,
It still doesn’t work. I’ve tried printing the category ID, but nothing shows. And I’ve cleared all caches many, many times since I’ve added the snippet.
Still, I LOVE the plugin.
I’m also having one other issue:
I’m using the snippet to change the text for a custom post type, and it’s working beautifully.
However, I tried to add another one for The Events Calendar post type. The post type there is tribe_events, but the singular is event or events. I am getting a critical error and I’ve tried many possible variants of the post type. Not sure what I’m doing wrong.
Thanks
Hello Blaz,
thank you for the plugin, it works great on my site.
I just wanted to ask you one thing. In the description it says that one can change ratings in the admin panel. Do I need the premium version for this? I couldn´t find the option.
Best Regards
Asterios
Hi Asterios,
No, you don’t need a premium version to change ratings. Rating can be changed in the post editor for each post. There should be a meta box at the bottom where you can change ratings.
Regards,
Blaz
Hey! I love this plugin. However, how can I change the text of certain strings in the “Customize” section?
Hi there,
The string can be changed in the customize section unless the multilingual mode is enabled. In that case you should change string through plugin for translations such as Loco translate.
Regards,
Blaz
Hey! How do I add links to the share icons? I can’t find the option in the settings
If you have social share enabled you can’t add links because the icons will link to “sharer” on social media sites (for sharing posts). If you want your own links there, you should disable the social share option.
Can i remove schema from posts listing page?
I have for example posts that i add in other pages, i want to show stars rating but not the schema. I want to have the schema generated only on page where i add the rating.
Is that possible?
Thanks
Hi Marius,
For this you can use the rmp_structured_data filter mentioned above. You check if it’s posts listing page and in that case you return an empty string.
Regards,
Blaz
It works perfectly, Thank you Blaz !
Hi Blaz,
Thanks for this nice plugin !
I wanted to know, do you plan on linking votes to the user who made them ? Right now the votes are stored in a cookie, that can be deleted and we have no way of knowing the actual note, just that the user has voted.
It is a bit disapointing as most sites remembers the notes of the users and lets them see which content they rated.
Also i would like to refresh the page after the user has submitted a vote, how could i achieve that ? I tried to add a “header(“Refresh:0″) ” with the “rmp_after_vote” action from your doc but it doesn’t work (i suppose because the action doesn’t influence the front).
Thanks,
Cedric
Hi there!
1. Correct, when a visitor submits rating a cookie is stored in his browser. The plugin only uses these cookies to prevent “double votes”. Nevertheless, you can always build on top of that. You could make your own implementation and check which posts the visitor has rated, because post ID is stored in the cookie.
2. For refreshing the page, it would be probably best to do it via JS. You could for example use mutation observer to see when the number of votes changes and refresh the page. Nevertheless, I don’t understand why would you want to refresh the page after rating is submitted. At least not from UX perspective.
Regards,
Blaz
Hello! Thanks for the plugin.
Is there anyway to move the Average score and Number of votes to the right of stars?
thank you
Hi there,
That can be done by creating a custom template and moving the elements. More about this above in the documentation.
Regards,
Blaz
Hello. My Plugin build 2 product schema for each post or page.
what should I do?
Hi there,
I recommend following the steps listed here to figure out what’s causing the issue.
Regards,
Blaz
Hi Blaz,
This is an amazing plugin. I just created a Custom Post type and the rating option is showing up. However I do not want a rating on this. Any idea on how I can remove the rating from the custom post type? Please note, I have left the custom-post-type field blank.
Thanks in advance!
Jason
Hi Jason,
That seems strange. Are you using the “automatic option” or did you code rating widgets in the template? In any case you can use rmp_display_rating_widget filter to prevent rating widgets from showing on custom post types. Something like this should do the trick:
add_filter( ‘rmp_display_rating_widget’, ‘blazzdev_show_rating_widget’ );
function blazzdev_show_rating_widget() {
if( get_post_type() == ‘your-custom-post-type’ ) {
return false;
}
return true;
}
Regards,
Blaz
Dear Blaz, I use your plugin on my site [url] and I am very happy how it works. My problem is to show the star ratings in rich snippets. I chose the Recipe schema in Rate my post. But the rich results test shows me 10 errors (like cooking time and other fields missing). And in the field “description” instead of the excerpt, it shows the title of the recipe. How can I modify it? Thank you. Iryna
Hi Iryna,
Those are not errors but warnings (recommended fields). Those fields are available in the PRO version. More about the schema selector in the PRO version here.
Best regards,
Blaz
Hi, how do I block the star rating from custom post type please? I don’t want it to rate the blog or new posts and these are plugins. Lovely plugin. 🙂 Best wishes from Katy
Hi Katy,
The rating widget shows in custom post type only if custom post type is selected in the settings. Otherwise the rating widget, should not show there. If that’s not the case there is probably some incompatibility with other 3rd party plugin or theme.
Regards,
Blaz
How can I get something like for a post or blog,
How many vote for 5 stars
How many vote for 4 stars
Etc.
Hi,
There is no “out of the box” feature for this. However, all the required data is stored in rmp_analytics table and can be retrieved programmatically.
Regards,
Blaz
Hi Blaz,
Rate My Post is a great plugin with so many options! I’m wondering if I’m missing how to position the rating and results widgets for a custom post type. Now both items are at the top and I would like to position them below the content. Thanks
Hi there,
Well, there are different options. You can use the shortcode or add the shortcode directly in the template for custom post type. You can read more about this in the troubleshooting section above.
Regards,
Blaz
Hi, i really like your rate tool, nice job! I use it in Elementor. Within a normal custom post type it is working really fine. But when i want to use it in a popup it doesn’t work like it should. At this point it shows the rating tool, but you can click on any star and then nothing happens. Hope you’ll have a fix or suggestion for this. Thanks in advance and keep up the great work!
Hi there,
That’s probably because the rating widget is not present in the DOM when the page loads and thus doesn’t get initialized. You can initialize it by calling the RateMyPost.re_init(); function after it gets injected in the DOM. More about this above in the Javascript Functions/Methods section.
Regards,
Blaz
Hi, I am new to blogging. I’m just wondering whether I would get in trouble for tracking IP addresses to prevent double ratings, am I allowed to turn this on ?
Hi Lily,
If you are subject to GDPR, you shouldn’t be tracking IP addresses without informing users about it, according to my knowledge.
Regards,
Blaz
Hello Blaz,
great plugin!
I am trying to delete single ratings that are listed on the Analytics page. How can I do that? In the database? I don’t want to reset the rating completely. I would lose all the other ratings then. I just need to eliminate specific ratings.
Thanks a lot.
Hi Robi,
Yeah, that’s only possible to do directly in the database. Simply delete entries in rmp_analytics table.
Best regards,
Blaz
Hi can I know how to change the rating result type I mean if someone gives 5 stars and someone
give 4 stars then this plugin result is 4.5 I wat result as 9 is it possible?
Hi there,
You can use the rmp_max_rating filter. See the documentation above for more info.
Regards,
Blaz
Hello, I’ve been trying to add my own widget (with the code that you have provided), so far it is working, however the thumbnail’s image is really big.
instead of showing 123123-150×150 for example is shows quite a big image like 5MB. Is there a way to change this to thumbnail default size?
Hi Ivo,
The plugin searches for “thumbnail” image size and if it’s registered it uses that image size. So, if the images are big, it means that you don’t have the “thumbnail” image size registered. You can register it yourself and then regenerate thumbnails with a plugin or via CLI.
Regards,
Blaz
Hi there,
I have a problem for displaying rating on my posts.
I’m using Elementor Pro (Posts widget) AND Ele-custom-skin for making a custom loop to displaying my posts.
If I use the shortcode : [ratemypost], rating are displaying but only the first post rate is working.
I tried to make an Elementor custom tag for including shortcode like : [ratemypost id=”$post->ID”] in my loop but got the same problem.
Is there something that I can make for solved this ?
Thanks for your help !
Hi Florian,
Do you have “Ajax load results” enabled in the settings? That feature is not compatible with multiple rating widgets on a single page. Disabling it should fix the problems.
Regards,
Blaz
It’s works perfectly now, thanks !
Hi! Pretty good plugin, and I thank you for it.
Actually I would like to trigger a post rate, is it possible? Is there a function like ” rmp_rate($postID, $action, $value) “
Hi there,
I think the easiest way to do this would be with javascript. Look into jQuery trigger method 🙂
Regards,
Blaz
In fact, I built a mobile app that retrieve posts via an API page in my WordPress site, and display them. So I’m looking for a way to rate a post from that very mobile app.
I think it would be easier if I have the PHP function you use to rate a post, as I said previously something like ” rmp_rate($postID, $action, $value) ” – I don’t know if you get my point.
Wouldn’t it be easier to send a request to the endpoint? The ratings are submitted via ajax so I guess you could simply sent request to the endpoint?
Blaz
Down on the left side of each star, there is a zero (0). How can I take it off?
This sounds like CSS issue. It’s hard to say without seeing the website.
Blaz
Is there any way to update posts ratings with code?
Hi there,
The ratings are stored in post meta (rmp_avg_rating). You can therefore update them with update_post_meta WP function.
Blaz
Hello and thanks you for the plugin!
I use the plugin for rating recipes on a website with two languages. Is there a way to synchronise the rating between the translations (add_action(‘rmp_after_vote’,…))?
Thanks for the help.
Hi there,
Do you have a multisite or how is the multi-language setup made? All ratings are saved in post meta and thus it’s of course possible to sync them. Nevertheless, this would require some PHP know-how.
Blaz
Hi Blaz
The multi-language setup is made with polylang plugin (each language has its domain).
my idea:
within the rmp_after_vote-hook call, i get the necessary data and can find the translation (post-id) via pll and then rate it. but i haven’t found a function to do the rating programmatically (like for example rmp_get_avg_rating() to get the average rating in the dev-functions).
or is there a simpler, better way?
Thank you for guiding.
uvo
Well, the vote count and average rating are saved in post meta so it should be relatively easy to change them. You can simply use update_post_meta function. You can check save_vote_count and save_rating methods in the plugin to see how this is handled there.
Blaz
thank you very much for the helpful hints. it took me some time to understand and to implement the logic it but now it works.
uvo
Hey there
Great plugin. I’m evaluating it for a client (a charity). If there is a positive rating, they would like it to present a donation option rather than the social options. Can that be easily customised?
Hi Sian,
You can use rmp_before_social_icons and rmp_after_social_icons actions (see above) to print custom content in the social widget. Other content in social widget can be hidden with custom CSS. So it should be relatively easy to add a donation option there.
Regards,
Blaz
Hello there!
I have a question:
How can i customize the rating widget so that the user can rate 1-10 but without .5 decimals and without showing half-covered icons?
Hi there,
You can change to 10-star rating system with rmp_max_rating filter (see above). Removing the decimals is currently not possible.
Regards,
Blaz
¿How about if I change the structured data from the structured-data.php to keep the dynamic data in the JSON markup? ¿Is that posible ? or ¿Do i need to use the rmp_structured_data function in the functions.php with stactic data? because I want to use danymic data base on the post information like the title, publish_date and so on.
It’s better to use rmp_structured_data hook, as otherwise you will lose all your changes with the next update. You can also use dynamic data within the filter.
Regards,
Blaz
Hi there, i just installed this plugin and i must say this is the best and easiest rating plugin i’ve used so far. I just have a question, how can i implement it on comments?
Hi there,
The plugin is related to comments in any way. That’s not its intended functionality.
Blaz
Hey Blaz K.
thank you for this Plugin.
Is there a way to customize the Textcolor on every singel Page???
Thank you for your response
Olaf
Hi Olaf,
You can do this with custom CSS. Each rating widget has a class with post id.
Regards,
Blaz
Hi, this is really a great plugin! It is exactly how I imagined it to work. Thank you so much!
I have one question. Is there a way to display the top rated posts in rows instead of a list?
Thank you,
Katrin
Hi Katrin,
Unfortunately not out of the box.
Regards,
Blaz
Hi, where is the shortcode to embed on the website? or does it not exist in the free version?
Hi Nelly,
The shortcode is [ratemypost] as mentioned above.
Blaz
Hi, l have to much category. And l dont want show rating 5 category how l do it this?
add_filter( ‘rmp_display_rating_widget’, ‘blazzdev_show_rating_widget’ );
function blazzdev_show_rating_widget() {
if( in_category( ‘uncategorized’ ) ) { // category slug
return false;
}
return true;
}
Hi Yusuf,
replace uncategorized with your category slug.
Regards,
Blaz
Hi! Thanks for the plugin! Doesn’t work on AMP page with AMP WP plugin
Hi Stanislav,
I can’t replicate this error. Please try following this guide: https://wordpress.org/support/topic/sticky-read-before-posting-%e2%9a%a0%ef%b8%8f/
Regards,
Blaz
Hello Blaz K,
First of all, I want to thank you for creating this wonderful plugin 👌
Is there a shortcode for the top rated posts widget?
Kind Regards
Hi Mohamed,
Unfortunately not. but you can use rmp_get_top_rated_posts function to retrieve top rated posts. Then you can style them as you like.
Regards,
Blaz
Hello, great plugin, simple and easy to install. My issue with the plugin is that there is difference between what is shown in plugin>Stats , when I order by Average rating, and what is shown by the widget.
I think the general idea is if we have 3 posts with following:
post A, rate :5 (votes 1)
post B, rate 5(votes 2)
post C, rate 5 (votes 1), the order should be like it is in the plugin>Stats page, so : B A C (where A and C should be ordered by post name for example, since they have same votes and rating)?
Hi there,
I agree. This is on the roadmap I just haven’t had time to look at it yet.
Blaz
On a similar note, under Rate my Post -> Analytics; the math doesn’t seem to be working out – please note that this is actual data from your table for a single product:
Average Rating Total Votes Rated
2 6 3
1.8 5 3
1.5 4 1
Can you explain these values? The Average Rating data is wrong. Ignoring the Average Rating column, the weighted average for this dataset is 2.47, assuming Rated refers to a 1 to 5 star rating system. Thanks!
Hey, I think I figured this out – you’re presenting an running average rating (as a function of time), right?
Hi,
I love this plugin, and the ease and functions of its use.
I want to ensure there is clear information to users regarding the plugin and GDPR. As I don’t want to take any data without the users/visitors consent. I’ve therefore disabled track IP and track users, will this stop analytics? Is there anything else the plugin stores, regarding the user’s information, aside from cookies? And if they reject cookies, is this plugin’s cookie mandatory? Thank you
Hi Oli,
If IP tracking is disabled, no information about the person that submits a rating is stored. According to my knowledge this should be ok in terms of GDPR. The plugin uses cookies only to prevent multiple votes from the same user.
Regards,
Blaz
Hi Blaz,
That’s great, thank you.
Hi, thanks for the plugin really useful.
Is it possible to ask for a reason to people that decide to rate the post with a low rank? For example: show a textarea for asking a reason if the rank is lower than 3.
Thank you,
Hi there,
Yes, this one of the plugin features.
Regards,
Blaz
Hi Blaz,
thank you for this really helpful Plugin! It seems to be a swiss-army-knife.
My question is: is there a chance to reset all statistics? We had the plugin running on the staging-version of a website and tested around a bit. Now we want to move the site to the live-system and want to have a clean statistic. Any way to do so without uninstalling the plugin and then do all the config-stuff on the live-system again?
Cheers,
Roman
Hi Roman,
In the tools section you will find a button which does exactly what you are asking 🙂
Blaz
Hi, am I able to use rmp in an elementor form widget?
As for now I am able to put the shortcode into the form widget but the individual user ratings is not being collected into Elementor > Submissions.
My goal is to collect individual user ratings into Elementor > Submissions.
Is it possible?
Hi! Brilliant plugin well done! I just wanted to ask if there is a way to use the shortcode for the same post in more than one place on the page. Right now I shop the product on the top and the bottom of my page but the rating only shows on the first item. Thanks 🙂
Is it not possible to get top voted post over last 24 hours, week, month ect?
Hello Sir, I would like to ask you, if / how is possible to sort post based on rating using function ?orderby=…. in URL. Thank you!
Hi,
Please see here: https://wordpress.org/support/topic/sort-custom-post-type-on-average-rating/
Blaz
Hi Blaz,
Thanks a lot for this great plugin!
Is there any event that fires when the user clicks on submit button?
I would like to create a dataLayer with the rated stars like this:
$(document).on(‘event-name’, function(event) {
window.dataLayer.push({
“event” : “rmp_submission”,
“rating” : get-rated-stars
})
});
Thanks
Hi Fer,
Unfortunately not. But I guess you could add click event on the stars through your own script?
Blaz
Is it possible to only give “Yes” and “No” as the voting options? E.g. I want to ask “Was this article helpful?” and then users would have the option to say “yes” or “no”.
Thanks!
Hi Joe,
Not out of the box.
Blaz
Hi Blaz,
I am using elementor shortcode widget ([ratemypost]) twice in an elementor post template. One for mobile and one for desktop, as I want it to appear in different places in the page for each device. However only one of the widget then show. Is there a work around for this?
Thanks
Hi there,
Not sure. I noted this and will test in the future.
Blaz
Hi,
Great plugin!
I want to have multiple rating widgets on one page, so that users can rate different content on the one page, separately.
When I add more than one instance of the shortcode [ratemypost] on a single page, only the first widget instance is shown.
I have ensure that the ajax load results in disabled.
What am I doing wrong?
Thanks
Sam
Hi,
I really like this plugin, but I’m facing a problem. How could I write a text after the top rating? not just the number of stars and the number of votes. After the number of votes, I would like to write something.
Can you help me please?
Thanks!
Hi!
Thanks for the plugin, it looks great and it’s all that I need, but somehow it doesn’t display the hearts or stars, just squares. I have to tell you first that while I’m logged in I can see the hearts.
I’m using the Trellis theme from Mediavine, the theme creates the critical CSS and for caching I use WP Super Cache. Somehow after I clear/purge all the critical CSS the hearts appear on incognito, but after I activate WP Super Cache, it shows squares again (Super Cache activated but with cache disabled).
Regards,
Paul
Hi! Love the plugin! I am creating posts via PHP and when save to WP and publish I would like to set a rating (and with like a random number of reviews). What metadata to save?
Hi David,
The following meta data is used:
Regards,
Blaz
Hi ! Great Plugin you have there.
one comment and one question
1. I saw that some people had trouble with the categories for the top rated function, and I was too. After some time, I found a way to fix it by using this code:
add_filter( ‘rmp_top_rated_query’, ‘blazzdev_modify_top_rated_query’ );
function blazzdev_modify_top_rated_query( $args ) {
if( is_category() ) {
$category = get_the_category();
if( $category ) { // category has posts
$category = get_category( get_query_var( ‘cat’ ) );
$cat_id = $category->cat_ID;
$args[‘cat’] = $cat_id;
} else { // no posts in category
return array();
}
}
return $args;
}
Then, the question:
For the blazzdev_rmp_thumb function, allowing to get bigger images than the tiny one in the top rated, impossible to get any change with the code you provide above. I added
add_filter( ‘rmp_thumbnail_size’, ‘blazzdev_rmp_thumb’, 10, 2 );
function blazzdev_rmp_thumb( $imageSize ) {
return ‘large’;
}
to the child theme, but it does nothing… any reason why? Is there anything else that must be done on top of adding that to the child theme function php?? I don’t get what it should really do. In the thumbnail function, the large is defined as 1024×1024, but your code does not relate to that I guess…. any idea?
Hi there,
Not sure. Do you have image size you’re declaring registered in your theme?
Regards,
Blaz
Hi Blaz,
well, that is actually the question. I do not even know where to look for.
What I tried was to add in child theme the following:
add_image_size( ‘largetest’, 600, 600 );
add_filter( ‘rmp_thumbnail_size’, ‘blazzdev_rmp_thumb’, 10, 2 );
function blazzdev_rmp_thumb( $imageSize ) {
return ‘largetest’;
}
But this is not working. Where should this imagineSize be declared then?
Thanks for your support !!!
Julien
If you registered new image size, you have to regenerate media. Read more here.
Hi, I tried that. I also looked into Regenerate Thumbnails to test different sizes that are already used in the Theme successfully, but it never changes the size of the Thumbnail in the footer.
As well, I tried to add the widget in different places, as I had it in footnote, and thought it could be bad. Also there, it does not change anything …
Any idea? 😉
Hi Julien,
No idea. The filter should work. You can check the code of top_rated_posts method in \rate-my-post\public\class-rate-my-post-public.php.
Best regards,
Blaz
Hi, thanks for the plugin; it works really well!
Right now, I’m using the WordPress REST API (https://developer.wordpress.org/rest-api/), and I was wondering if it’s any way to access this plugin data (stats/analytics sections) from that API. I appreciate any help you can provide.
Regards,
Carlos Huapaya
Hi Carlos,
Unfortunately, not out of the box. But I guess you could create custom endpoints to retrieve this data. The plugin saves ratings and vote count in post meta and the analytics section is basically just a SQL table.
Best regards,
Blaz
Hello Blaz and thanks for the great plugin! I have a question, is it possible to display the number of stars in the comments to the post, here is an example “https://prnt.sc/eR3OyrGsdYY5”? All clambered, but did not find a solution. Thank you!
Hi Anatoly,
The plugin is unfortunately not related to WordPress comments in any way and thus this is not possible.
Best regards,
Blaz
I would like all my new posts to have at least one rating (e.g. 5) or a random number of ratings by default – how can I set it?
I would be very grateful for your help.
Hi Blaz K.
I am seeking assistance in displaying star rating results for each post on our homepage. Currently, I am using a Query loop widget for post design and using the Kadence theme.
While I have inserted the results shortcode into the post template (Query loop), the displayed empty stars do not seem to be synchronized with the actual post ratings. Could you please provide guidance on how to successfully display the accurate star rating results for our posts?
Hi,
I have ratings enabled for archives, but it seems that the rating numbers also show up next to the title in RSS feeds. Is there any way to remove the rating number from RSS feeds while having them enabled for archives?
Thanks
Hello
I want to use a font family (Persian) for writing, how can I replace it with a plugin font?
I also want to create a space between the title and the stars. Is it possible and how?