How to change columns count of Related Products Feature

Last Updated on

There is a feature in Woocommerce called Related Products which in Jupiter you can see in front end in single product pages.


This feature is part of Woocommerce plugin itself and to follow up it is better to contact their support directly. There a re other workarounds regarding Woocommerce front end column system which are added as filters. For more information please kindly check Woocommerce website.

Related Products

You can see an example of the feature by clicking here and scrolling down to the bottom of the page.

This feature has 2 columns by default in Jupiter, but this can be changed by taking steps below:

1
Install a Child Theme.  

Install a Child Theme. For more information please click here.

2
Add the code below into functions.php file of your child theme: 

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'] = 2; // arranged in 2 columns
return $args;
}

x
Note: Change 4 and 2 to whatever product and column count you want to have for related products feature.
x
Magic: SOURCE: https://docs.woothemes.com/document/change-number-of-related-products-output/
Was this helpful?

Related Topics

Related Forum Topics

There is no related forum topic

Previous Article:
Next Article:

Can't find what you're looking for?

Open New Ticket