-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Hi,
Hoping someone can help! I've trawled the internet for hours with this one and trialled a few workarounds with no luck...
In the Go Theme Woocommerce Shop page for sudsandbuds.co.uk/shop, there are always only 3 columns and 3 rows, no matter what number I enter in the box at the end of this path: 'Dashboard - Appearance - Customise - WooCommerce - Products Catalogue - Products per row'
I'm trying to get 4 columns and 4 rows. I'll settle for 4 columns and 3 rows but I can't seem to change the amount of either rows or columns.
Here's a screenshot of my shop with the 3 columns:
Weirdly, the shop displays 4 columns for my two subcategories ('topped soaps' and 'smooth soaps'):
I've created a child theme (parent: 'Go') and entered code via 'Appearance - Theme file editor'. I've also entered code via 'Snippets - Add New' as well as directly to the Go theme itself via 'Appearance - 'Theme file editor'. None of the approaches work. Here are 5 of the codes I've trialled:
// Change the Number of Columns Displayed Per Page
add_filter( 'loop_shop_columns', 'lw_loop_shop_columns' );
function lw_loop_shop_columns( $columns ) {
$columns = 4;
return $columns;
}
@media (min-width: 768px) {
ul.products.columns-4 li.product {
width: 25%;
}
}// Change number of products per row to 4
add_filter('loop_shop_columns', 'custom_loop_columns', 999);
function custom_loop_columns() {
return 4; // Change this number to the desired number of columns
}add_filter('loop_shop_columns', 'woo_loop_columns', 999);
if (!function_exists('woo_loop_columns')) {
function woo_loop_columns() {
return 4; // 4 products per row
}
}
}
// change number of columns
add_filter( 'loop_shop_per_page', 'new_loop_col_shop_per_page', 20 );
function new_loop_col_shop_per_page( $cols ) {
// Return the number of products you wanna show per page.
$cols = 3;
return $cols;
}
Any suggestions? I'm lost with this!
Best wishes
Maya
Priority (select one):
- Medium - Doesn't work as expected

