Skip to main content
Flox Blog Beginner's Guide for Web Developers. 60% Off in Website Design & Development click here.

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
F