Home Looking for theme support? WordPress Themes Free Themes SparkleStore How to change number of products to display under Related Products Section Reply To: How to change number of products to display under Related Products Section

#1579
Sparkle Themes
Keymaster

Hi there,

Thanks for using our theme, we really appreciate your business

This code is help you

remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_related_products’, 20);

add_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_output_related_products’, 25);
function woocommerce_output_related_products(){
$args = array(
‘posts_per_page’ => 6,
‘columns’ => 3
);
woocommerce_related_products( apply_filters( ‘woocommerce_output_related_products_args’, $args ) );
}

Thanks
Sparkle Themes