Display Product Reviews on WordPress Homepage or Archive Page

Sharing is Caring

If you want to display product reviews on archive page in WordPress, you’re in the right place.

Adding reviews to your WooCommerce archive pages, such as the shop or category pages, helps build trust with potential customers by showing real feedback right where they can see it.

In this guide, we’ll walk you through two easy methods to achieve this.

Method 1: Display Product Reviews on WordPress Using the Theme Customizer

One of the simplest ways to display product reviews on wordpress homapage or archive page by using the WordPress Theme Customizer. Follow these steps:

  1. Go to the Theme Customizer: Log in to your WordPress dashboard and navigate to Appearance > Customize. This will open the Theme Customizer.
  2. Navigate to WooCommerce Settings: Within the Customizer, find the WooCommerce section and click on it to access WooCommerce-specific settings.
  3. Select Product Catalog: Under WooCommerce, click on Product Catalog. Here, you’ll see various settings related to how your products are displayed.
  4. Enable Reviews: Look for an option like Show Reviews and make sure it’s enabled. This option allows you to display product reviews directly on the archive page, enhancing the customer experience.

What If the Option Isn’t There?
Not all themes have the option to show reviews in the Customizer. If you don’t see it, don’t worry—there’s an alternative method using a bit of code!

Method 2: Display Product Reviews on Archive Page Using a Code Snippet

If your theme doesn’t support displaying reviews on WordPress homepage or archive page via the Customizer, you can add this functionality manually with a small PHP snippet. Here’s how:

  1. Use a Code Snippet Plugin: If you’re not comfortable editing your theme files, a plugin like “Code Snippets” can help. Install and activate the plugin from the WordPress repository to add custom code safely.
  2. Add the Code to Your Child Theme: For those who prefer a hands-on approach, make sure you’re using a child theme to prevent losing changes when your theme updates. Add the following code to the functions.php file of your child theme:
// Add reviews to WooCommerce product loop below the title and price
function add_reviews_to_product_catalog() {
    global $product;

    // Get the number of reviews for the product
    $review_count = $product->get_review_count();

    // Display the reviews count
    if ( $review_count > 0 ) {
        // Use singular or plural form based on the review count
        $reviews_text = $review_count . ' ' . _n( 'review', 'reviews', $review_count, 'woocommerce' );
        echo '<div class="product-reviews">' . esc_html( $reviews_text ) . '</div>';
    }
}

// Hook the function to WooCommerce after the product details in the shop loop
add_action( 'woocommerce_after_shop_loop_item', 'add_reviews_to_product_catalog', 20 );
  1. What Does This Code Do?: This code snippet helps you display product reviews on wordpress archive page or homepage by adding a review count below each product in the WooCommerce shop loop. It dynamically checks the number of reviews for each product and displays the correct wording based on whether there’s a single review or multiple reviews.
  2. Styling Your Reviews: Once the code is added, you can customize the appearance of the reviews using CSS. Go to Appearance > Customize > Additional CSS and style the .product-reviews class to match your site’s design.

Conclusion

By following these steps, you can easily display product reviews on WordPress archive page of your WooCommerce store. Whether using the Customizer or adding a code snippet, these methods will help you showcase valuable customer feedback right where it counts. Always remember to back up your site before making any changes, and if you’re unsure about editing code, consider consulting with a developer. Happy selling!

Sharing is Caring

Get Premium Content For Free

Just put your email to get exclusive content!

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *