I am using woocommerce with a themefores template. By default woocommerce show 4 product per row, but I want to show 5.
I am using a child template so I duplicate woocommerce file and inside I have content-product.php file.
Here I modified this.
if ( empty( $woocommerce_loop['columns'] ) )
$woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 5 );
but no work.
I read how to change this I found this function that I put in my function.php in child template
add_filter('loop_shop_columns', 'custom_loop_columns');
if (!function_exists('custom_loop_columns')) {
function custom_loop_columns() {
return 8;
}
}
but don’t work too.
Any idea how to change the number of product per row in woocomerce!!!!
Try this,
In your function.php check this function.
Then your child theme add this,
for more details check this
Hope it helps..
In my case it works with the following code
I inserted these styles on child theme’s style.css file
and use the following php code into the theme’s function.php
I know its late but this code (but it was not easy to find a good solution out there) sure did help me: (functions.php prefered in child-theme)
and in css: