WooCommerce: change the number of related products displayed in your shop


This article describes how to change the number of Related Products displayed within your WooCommerce Shop. Both the number of rows and the number of products in each row can be customized.

General Instructions:

  1. Log into your WordPress Dashboard
  2. Click on Appearance > Editor and modify the footer.php file
  3. Add the following code to the end of functions.php (Important: “?>” should be the last bit of code within functions.php)
 // Redefine woocommerce_output_related_products() function woocommerce_output_related_products() { woocommerce_related_products(4,2); // Display 4 products in rows of 2 } 

Please Note: – 4 is for the number of products in each row. – 2 is for the number of rows. (adjust according to your needs) [search_terms]woocommerce, related products, related product, product display, products displayed, show, shown, ecommerce, shop[/search_terms]