Publicat pe

To change the related products number and columns

Change the related products number and columns

Maybe this article will help you a little bit. With the new update of Woocommerce something changes in the related.php located in Woocommerce > … related.php

To change the number of the columns and products displayed you must find this

1269 function woocommerce_related_products( $args = array() ) {
global $product, $woocommerce_loop;

$defaults = array(
‘posts_per_page’ => 6,
‘columns’ => 3,
‘orderby’ => ‘rand’,
‘order’ => ‘desc’,
);

located on the page wc-template-functions.php . The path is /home/your user/domain or subdomain/wp-content/plugins/woocommerce/includes/wc-template-functions.php

You can verify on my website at this address:
https://handmade.luxdesign28.ro/produs/cutiuta-culori-tricolor-motive-traditionale-pe-fond-alb-si-rosu-28222/

by default are 2 columns and 2 products. I changed with 3 columns and 6 products. You cand make the change to fit your store. This is an article written for owner of stores that use Woocommerce plugin and WordPress CMS platform. Hope this help you!