Suite à l'installation de votre plugin, est il possible d'obtenir le nombre total de personne ayant cliqué et noté avec le "Article Rating"
Cas d'usage : Site de tutoriel Automobile. Nous pourrions savoir le nombre de voiture réparé en fonction du nombre de personnes ayant noté les articles.
In case you want to say thank you! 🙂 We'd really appreciate if you leave a good review on the plugin page. This is the best way to say thank you to this project and the support team.
So please confirm that you need to display the number of ratings for all articles.
If so, show on some screenshots where exactly you need to display the number of ratings.
In case you want to say thank you! 🙂 We'd really appreciate if you leave a good review on the plugin page. This is the best way to say thank you to this project and the support team.
Thank you for he clarification. I'll ask the developers and get back to you ASAP.
In case you want to say thank you! 🙂 We'd really appreciate if you leave a good review on the plugin page. This is the best way to say thank you to this project and the support team.
1. Add this code in the functions.php file of the active theme:
add_shortcode('wpdiscuz_all_ratings', 'wpdiscuz_get_all_ratings');
function wpdiscuz_get_all_ratings(){
global $wpdb;
$ratings_count = (int)$wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}wc_users_rated`");
echo 'Ratings Count - ' . $ratings_count;
}
2. Then use the following shortcode to display the total number of ratings for all articles:
[wpdiscuz_all_ratings]
In case you want to say thank you! 🙂 We'd really appreciate if you leave a good review on the plugin page. This is the best way to say thank you to this project and the support team.