Modify columns at the products page with Woocommerce
Hello,
I want to modify the products page from 3 columns to 2. I didn't find an option in the theme, is it there any?
I also tried with this code at the functions.php without success. How can I do it? Thank you.
/**
* Change number or products per row to 3
*/
add_filter('loop_shop_columns', 'loop_columns', 999);
if (!function_exists('loop_columns')) {
function loop_columns() {
return 2; // 3 products per row
}
}
/**
* Override theme default specification for product # per row
*/
function loop_columns() {
return 5; // 5 products per row
}
add_filter('loop_shop_columns', 'loop_columns', 999);
Comments
Hi,
This could be achievable by writing a custom CSS code.
If you send a link to your website, I can help write it.
Thanks