• Awesome plugin! Thank you!

    May you please provide any code to display reviews quantity on a product archive page just near the stars rating:

    To look like that? ????? (15 reviews)

    Because currently only star rating are visible and I would like it to show the reviews count as well near the stars.

    Appreciate if you can share any code with me to be able to customize that,

    I’ve found the following php code which work, but not sure will it fit and where to past it to work correctly:

    <div class=”product-ratings”> <?php if ( get_option( ‘woocommerce_enable_review_rating’ ) === ‘no’ ) { return; } $rating_count = $product->get_rating_count(); $review_count = $product->get_review_count(); $average = $product->get_average_rating(); if ( $rating_count > 0 ) : ?> <div class=”woocommerce-product-rating” itemprop=”aggregateRating” itemscope itemtype=”https://schema.org/AggregateRating”&gt; <div class=”star-rating” title=”<?php printf( __( ‘Rated %s out of 5’, ‘woocommerce’ ), $average ); ?>”> <span style=”width:<?php echo ( ( $average / 5 ) * 100 ); ?>%”> <strong itemprop=”ratingValue” class=”rating”><?php echo esc_html( $average ); ?> <?php printf( __( ‘out of %s5%s’, ‘woocommerce’ ), ‘<span itemprop=”bestRating”>’, ‘</span>’ ); ?> <?php printf( _n( ‘based on %s customer rating’, ‘based on %s customer ratings’, $rating_count, ‘woocommerce’ ), ‘<span itemprop=”ratingCount” class=”rating”>’ . $rating_count . ‘</span>’ ); ?> </span> </div> <?php if ( comments_open() ) : ?>(<?php printf( _n( ‘%s customer review’, ‘%s customer reviews’, $review_count, ‘woocommerce’ ), ‘<span itemprop=”reviewCount” class=”count”>’ . $review_count . ‘</span>’ ); ?>)<?php endif ?> </div> <?php endif; ?> </div><!– .product-ratings –>

    Thank you in advance!
    Kind regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hello there,

    Thanks for contacting us and I hope you’re doing well ??

    The starts are displayed by WooCommerce by default with the following option

    See the following link

    You can find this option on WooCommerce > Settings > Products.

    This option by default include the customer reviews.

    Maybe your theme hide this information. I checked with Proteo theme and seems is displayed in the right way. See the following link.

    You should take a look if your theme override the rating.php template you can find in WooCommerce

    wp-content/plugins/woocommerce/templates/single-product/rating.php

    On your theme

    wp-content/theme/YOURACTIVETHEME/woocommerce/single-product/rating.php

    And check if the theme revome this section and try to add it in order to add the number of reviews.

    we hope it helps you.

    Please, check it and let us know.

    Have a good day.

    Thread Starter ptm282192

    (@ptm282192)

    Thank you for your reply!

    Please check carefully what I wrote – in a single product page everything is displayed.

    I’m talking about Shop Archive pages/Shop category pages, where all the products listed.

    Shop category page displays only start (without reviews quantity) but I want it to show up stars with the review quantity near it – ????? (15 reviews)

    Also, is it possible to display start everywhere, even empty stars if zero reviews?

    May you help with it please?

    Thank you!

    • This reply was modified 4 years, 7 months ago by ptm282192.
    • This reply was modified 4 years, 7 months ago by ptm282192.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘????? (15 reviews)’ is closed to new replies.