0
votes

Woocommerce by default displays 4 categories and products per row in shop page. I want to display 5 categories / products per row, I edited CSS to have 5 columns and to resize the thumbnails, it worked, but the last / 5th column is always empty : the 5th category or product goes to the 2nd line.

1

1 Answers

0
votes

If you are using custom theme add this code in your functions.php

// Change number or products per row to 5
add_filter('loop_shop_columns', 'loop_columns');
if (!function_exists('loop_columns')) {
    function loop_columns() {
        return 5; // 5 products per row
    }
}

and If you are using any woothemes then add this code in your functions.php

// 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);