Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Display 2 columns in related products

Home / Forums / Virtue Theme / Display 2 columns in related products

This topic is: Not Resolved
[Not Resolved]
Posted in: Virtue Theme
April 18, 2018 at 2:36 pm

Hi I would like to implement this code in the Virtue theme for display 2 columns instead of the actual slider in the related products space of single product template.

/**
* WooCommerce Extra Feature
* ————————–
*
* Change number of related products on product page
* Set your own value for ‘posts_per_page’
*
*/
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;
}

But the code seems to not work.
Can anyone help me?

Thank you

  • The forum ‘Virtue Theme’ is closed to new topics and replies.