Skip to main content

Woocommerce related products limit code.

Woocommerce related products limit code.

In this article we will discuss about Woocommerce related products limit code.

Change Number of Related Products on single product page. First open functions.php and paste below code on this php file.

add_filter( 'woocommerce_output_related_products_args', 'bbloomer_change_number_related_products', 9999 );
function bbloomer_change_number_related_products( $args ) {
 $args['posts_per_page'] = 3; // # of related products
 $args['columns'] = 3; // # of columns per row
 return $args;
}

 

Leave a Reply

avatar
  Subscribe  
Notify of