Title: tomdm's Replies | WordPress.org

---

# tomdm

  [  ](https://wordpress.org/support/users/tomdm/)

 *   [Profile](https://wordpress.org/support/users/tomdm/)
 *   [Topics Started](https://wordpress.org/support/users/tomdm/topics/)
 *   [Replies Created](https://wordpress.org/support/users/tomdm/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/tomdm/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/tomdm/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/tomdm/engagements/)
 *   [Favorites](https://wordpress.org/support/users/tomdm/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Empty stars with Woocommerce](https://wordpress.org/support/topic/empty-stars-with-woocommerce/)
 *  [tomdm](https://wordpress.org/support/users/tomdm/)
 * (@tomdm)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/empty-stars-with-woocommerce/#post-5645911)
 * BladimirJavier if you don’t have the answer, don’t reply with an unhelpful answer.
   Everyone has a different use case, some people want the stars to show to keep
   the layout and design consistent.
 * As for the OPs question. If you have Woocommerce setup correctly with a ‘woocommerce’
   folder in the root of your theme, you can simply go into _woocommerce>loop>rating.
   php_
 * In the rating.php file, where you see:
 *     ```
       <?php if ( $rating_html = $product->get_rating_html() ) : ?>
       	<?php echo $rating_html; ?>
       <?php endif; ?>
       ```
   
 * Replace it with:
 *     ```
       <?php if ( $rating_html = $product->get_rating_html() ) { ?>
       	<?php echo $rating_html; ?>
       <?php } else {
       $rating_html  = '<div class="star-rating" title="' . sprintf( __( 'Rated %s out of 5', 'woocommerce' ), $rating ) . '">';
         $rating_html .= '<span style="width:' . ( ( $rating / 5 ) * 100 ) . '%"><strong class="rating">' . $rating . '</strong> ' . __( 'out of 5', 'woocommerce' ) . '</span>';
         $rating_html .= '</div>';
         echo $rating_html;
       }?>
       ```
   

Viewing 1 replies (of 1 total)