Replies: 0
Hello,
I am sorry if this has already been discussed, but the search function is really horrible. 🙁
Maybe I am in the wrong section, because I don’t know if this is theme related. Sorry for this as well.
I would like to re-design my related products output and already tried several ways, but am not able to change the amount of displayed products. I thought this might be due to image sizes and re-sized them through functions.php. This is working fine, but I still have only 3 items being displayed.
The code I tried:
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'] = 4; // 4 related products
$args['columns'] = 1; // arranged in 1 column
return $args;
}
The main reason for these changes: I wanted to add a related products slider, but even plugins didn’t display more than 3 items.