Hi,
I was wondering if pre_get_posts was supported, i.e for ordering results in a WP loop by descending rates (from best ratings to worst) for category pages (archive.php):
function order_by_rating_126($query)
{
if ( $query->is_main_query() && !is_admin() )
{
if ($query->is_category()){
//for all entries...
$query->set('posts_per_page', -1);
$test123 = array(
'spr_votes' => 'DESC',
'spr_rating' => 'DESC',
);
$query->set( 'orderby', $test123);
// $query->set( 'orderby', 'spr_votes spr_rating');
// $query->set( 'orderby', 'spr_rating spr_votes');
// sorting combination attributes won't work... in first instance
}
}
}
add_action('pre_get_posts', 'order_by_rating_126');
I used spr_votes but suppose is not logically ok, because I mean “mean ratings” not numbers of vote. Any help would be appreciated… thanks in advance!
]]>You have been announcing version 2.0 for a long time. Although I am quite satisfied with the tool, I would be glad about further improvements and additions.
For example, I would like to see at the dashboard a list of all rated articles sorted by actuality.
Can we users still expect to have version 2.0 or will nothing happen anymore with the plugin?
Greetings, Chuck
I have a number of custom taxonomies on my website. I would like the taxonomy pages to sort the results in descending order of their rating.
The following WordPress documentation page shows an example of exactly what I’m trying to accomplish on the taxonomy pages. And I mean EXACTLY. Supposedly their example code works “In tandem with a rating plugin that uses a separate database table, sorting by rating value can be achieved with posts_orderby in tandem with the post_join_paged filter.”
https://codex.www.ads-software.com/Plugin_API/Filter_Reference/posts_orderby
The following query works perfectly in mySQL:
SELECT * FROM wp_posts LEFT JOIN wp_spr_rating ON wp_posts.ID = wp_spr_rating.post_id
ORDER BY (wp_spr_rating.points / wp_spr_rating.votes) DESC
But when I try to implement it as follows (exactly the same as the example, with only the table and field names changed), the $post_count is 0.
function edit_posts_join_paged($join_paged_statement) {
$join_paged_statement = “LEFT JOIN wp_spr_rating ON wp_posts.ID = wp_spr_rating.post_id”;
return $join_paged_statement;
}
function edit_posts_orderby($orderby_statement) {
$orderby_statement = “(wp_spr_rating.points / wp_spr_rating.votes) DESC”;
return $orderby_statement;
}
add_filter(‘posts_orderby’, ‘edit_posts_orderby’);
add_filter(‘posts_join_paged’,’edit_posts_join_paged’);
$custom_query = new WP_Query( $args );
remove_filter(‘posts_join_paged’,’edit_posts_join_paged’);
remove_filter(‘posts_orderby’, ‘edit_posts_orderby’);
If I leave out the add_filter calls, everything works as expected, except that the results are sorted in descending order by publication date. If I include the add_filter calls, the result is empty.
Any thoughts on why this might be or if I’m doing something wrong?
]]>While your plugin works well for allowing my readers to rate my posts, it appears to treat them all as Products when they are in fact CreativeWorks. Is it possible you can make this an option in 2.0?
]]>Hi,
excluding button “reset votes” for this plugin I cannot see the detailed stats about votes and IP of people voting. This would be a very interesting feature because i.e some people auto-vote their own content, and there is not way avoiding it or removing fake votes.
Will something like that be supported in the future?
Thanks very much
]]>Hi there,
I recently installed WPML and had my website being translated from German to English. Everything works fine, except for the translations of the plugin Simple Rating.
I created a German language file 2 years ago and it works great. But it doesn’t show the English translation when I switch to it.
Thankful for your help,
Cheers
Greetings!
I installed but its not working. I used the <?php if(function_exists(‘spr_show_rating’)){echo spr_show_rating();}?> for that page
Still nothing shows.
Help?
https://www.dgcp.gob.do/index.php/servicios/registro-de-proveedores/
]]>That’s all I can do. With all respects.
https://goo.gl/ube1MM
Hello!
I installed the plugin on my new site and it looks awesome, simple, clean, great job there! I also love the functionality to display the rating above post content.
However, when I tested it, I noticed the newest votes don’t count. For example, on a post I had 1 rating and I gave it a second rating, in that moment it showed 2 votes. However, when I refresh the page, or visited it again after a moment, it shows 1 vote again and the rating score is back to how it was.
I mention I use wp-rocket as caching plugin. Could the rating plugin enter in conflict with cache plugins?
]]>Hello, I wanted to ask if there is a possibility to sort posts according to the star value of given posts?
Regards
David
please add shortcode [simplerating id=”post/page”]
]]>Hi Igor, hope you’re fine ?? First of all I really liked your plugin!
But, unfortunately I’m not being able to use it. Although I already activated it and checked the corresponding boxes “Show rating”, “Where to add” < Posts, “Position” < Before content and Save.
I don’t know why the ratings are not being shown on posts entries :/ Any idea of what might be happening and what should I do to solve it?
Here’s an example of a blog post (the plugin is active now, but not showing): https://www.reinadelmarketing.com/que-es-optimizacion-de-la-tasa-de-conversion-cro/?
]]>Like your plugin, simple, what I was looking for. Happy to donate. Rating is appearing for blogs but not for events though I have selected it.
Thanks
Titus
Hello!
Thank you very much for your plugin. I like it very much and it helps. But I have a little problem.
I use on my site <! – nextpage -> structure for splitting the material into pages. I want the rating to be shown at the end of the material. But the rating is shown on each page. I’m using automatic placement. Advise what to change in the code so that my visitors can see the rating only on the last page, i.e. at the end of the material.
Thank you.
]]>Hi,
Dear Simple Rating team,
After installation of Simple Rating plugin, stars show on all pages/posts but when you want to click on any star for rating, post have 0 stars. if you not understand pls visit my web and rate any post.
https://theasianpost.co.uk
https://theasianpost.co.uk/tube-strike-is-completely-unnecessary-sadiq-khan/
Kind regards,
Riz
Hi Igor,
First, I want to congratulate you on this awesome plugin. It’s clean, simple, and it works.
I’ve installed it on my site. Here’s an example:
https://www.musculation-prise-de-masse.com/futur-musculation-2016/
You’ll see “1 vote” at the top.
However, that page doesn’t show up as rich content on Google, like your screenshot suggests (https://ps.w.org/simple-rating/assets/screenshot-4.png?rev=1035569). I have checked “Use aggregated rating”.
I looked at the source code of my page (above). I don’t see any code that would insert rich content snippet. Can you help?
Thanks so much,
Etienne
]]>Hello
bbpress v2.5.10
Simple rating not working on bbpress
]]>I tried to make a donation to help support Simple Rating by clicking on the “Donate via Skrill” button in the Settings, but got the following error message:
Transaction not allowed
Wrong merchant email address!
Your plug-in has been incredibly useful to me. Please tell me what the best way is to send you a little money.
]]>I find it’s useful to know a post’s average rating, not just the counts of each rating. So I modified spr_show_voted() with the following:
$html .= ‘<span id=”spr_votes”>’.$votes.’ ‘.vote_counter_form($votes).’ (‘. number_format((float)$rate, 2, ‘.’, ”) .’)</span>’;
This way, when I’m editing a post, I can see an actual number for the star rating. What looks like 4 stars might actually be 3.83, and this makes a difference to me. I thought I’d pass this along as it may be useful to other users in a future version of your plug-in.
]]>I installed Simple Rating on a test site and got it working just fine in my custom theme using the manual insertion code suggested. I copied the entire wordpress database and all of the files to the production site, and now the rating no longer appears on my posts and the statistics metabox doesn’t appear when editing posts. The plugin is activated, and the settings for it are exactly the same as on my old site, including the checkbox for Show statistics metabox.
Is there some reason why it would work on the testing site, but stop working when I move it to a different server and a new database?
]]>Hello,
I can’t understand whats the proper way for changing text near stars (i.e “12 votes”), is there any hook or action for that?
]]>when i login, i can vote but as a guest it is not working? why, please solve my problem https://allinallnews.com/games/play-pokemon-go-basic-tips
]]>Hi admin, great work on this plugin.
Feedback for new features:
– Widget showing “Top ratings” – preferably with a small thumbnail if it finds images in a post
– Change size of stars (small/medium/large)
– Ability to rate from archive pages (i know you already plan to do this one, but im still mentioning it just for the record)
Thanks!
]]>When I insert the PHP function to display the contents Simple Rating of Accordions, to publish it, I do not visualize the scoring area, just function as such … Someone has this happened?
]]>Custom icons
]]>The widget can display best pages of all time. It would be cool to be able to show only best pages that created last month
]]>Hi!
In the manual insertion method:
Can you show before and after (both) in a template?
I only shown the first to appear.
]]>Hi to the forum!
I translated into Spanish (es-ES) Simple Rating 1.4 plugin and I’ve shared from my blog:
https://www.avalonsoftware.org/vagoblog/traduccion-de-simple-rating-en-espanol/
I have not known how to give it to them to the author.
Regards… Ignacio
]]>Hello,
when I try to vote when logged in it works, but when I try it when im logged out it doesn’t work, I disabled varnish cache on my server then it worked, I’ve searched for the problem and the only thing I noticed is when I open source code when I’m logged in, I see this:
/* <![CDATA[ */
var spr_ajax_object = {"ajax_url":"http:\/\/haltaalam.info\/article\/wp-admin\/admin-ajax.php","scale":"5","spr_type":"rs","rating_working":"1","post_id":"6422"};
/* ]]> */
and when logged out:
/* <![CDATA[ */
var spr_ajax_object = {"ajax_url":"http:\/\/haltaalam.info\/article\/wp-admin\/admin-ajax.php","scale":"5","spr_type":"rs","rating_working":""};
/* ]]> */
]]>
How to show rating value for example 3.5/5
and thank you for this awesome simple plugin, I really liked it