Be default, on single product page, the number of related products is 4. I would like it to be 5. I tried to use this function proposed by Woocommerce, however it doesn't work.
add_filter( 'woocommerce_output_related_products_args', 'jk_related_products_args', 20 ); function jk_related_products_args( $args ) {
$args['posts_per_page'] = 4; // 4 related products
$args['columns'] = 2; // arranged in 2 columns
return $args;
}
Hi,
Be default, on single product page, the number of related products is 4. I would like it to be 5. I tried to use this function proposed by Woocommerce, however it doesn't work.
https://docs.woocommerce.com/document/change-number-of-related-products-output/
Do you have an idea?
Best regards,
Clara.
Hi Clara,
I am afraid that's not possible without custom code edits.
Thanks