
Add the following code to your theme’s function.php file, or a functionality plugin to modify the number of WooCommerce Related Products that are displayed.
<?php
/**
* Change number of related products output
*/
function woo_related_products_limit() {
global $product;
$args['posts_per_page'] = 6;
return $args;
}
add_filter( 'woocommerce_output_related_products_args', 'jk_related_products_args' );
function jk_related_products_args( $args ) {
$args['posts_per_page'] = 3; // 4 related products
$args['columns'] = 3; // arranged in 2 columns
return $args;
}
Share Your Two Cents