Posted in: Newspaper
Apr 7, 2014 at 2:03 pm
Hello i’m struggling to find a way to have 5 columns rather than 4 in the woocommerce shop page. I would need smaller products in 5 columns
Is it possible to do this?
Thanks
Apr 8, 2014 at 10:46 am
Hi,
Add this code in function.php file
add_filter('loop_shop_columns', 'loop_columns');
if (!function_exists('loop_columns')) {
function loop_columns() {
return 5; // 3 products per row
}
}
like here: http://screencast.com/t/7Y7xSh1LBcxX
Then add this CSS in Theme panel -> Custom CSS
/* responsive monitor */
@media (min-width: 1200px) {
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
width: 16.05%;
}
}
/* responsive portrait tablet */
@media (min-width: 768px) and (max-width: 1018px) {
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
width: 16.05%;
}
}
@media (min-width: 1019px) and (max-width: 1199px) {
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
width: 16.05%;
}
}
Apr 12, 2014 at 2:17 pm
hi Marius, spotted a bug. If i add featured product shortcodes (5 columns) the layout is broken: pls have a look: http://oi60.tinypic.com/2uzr0nb.jpg
can you tell me how to fix this?
Thank you very much
Apr 14, 2014 at 7:08 pm
ok now it works not sure how, but they are fine. PLease forget this request.
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.
