Thank you for your kind words.
There is already a method in the plugin’s global object $pixreviews_plugin->get_average_rating()
.
I plan to do a shortcode based on that soon.
Thanks
Andrei
Hi Andrei, love your plugin!
I used <?php echo $pixreviews_plugin->get_average_rating(); ?>
Is it possible to show the stars images instead average numbers?
Thanks!
Marniks
Hi.
I’m trying to use the method mentioned above inside functions.php, but the page is trimmed or not working with this.
add_action( 'genesis_before_loop', 'show_average' );
function show_average() {
echo $pixreviews_plugin->get_average_rating();
}
Can you please show me another way how I can do this? thanks!
Hey guys,
They way you can do this is like this:
add_action( 'genesis_before_loop', 'show_average' );
function show_average() {
global $pixreviews_plugin;
echo $pixreviews_plugin->get_average_rating();
}