Woocommerce 4 Columns

eCommerce WordPress theme with various e-store features and WooCommerce support.
GK User
Tue Sep 16, 2014 10:24 am
Hi guys,

Fell in love with this theme :P

Just wondering - what's the best way going about putting the products on the category pages onto 4 columns as opposed to 3.

Thanks for your time.
User avatar
Fresh Boarder

GK User
Tue Sep 16, 2014 12:49 pm
Hi,

You'll have to edit Storebox/gavern/wc-functions.php file and change these filters:

Code: Select all
// Display 9 products per page.
add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 9;' ), 20 );

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

first specifies amount of products per page, the second products per row (you'll have to change it to .. " return 4; ".
Then you'll have to change the CSS code, I can help you with that, but I have to see your website. (You can send me a PM if you don't want to publish the URL here).
User avatar
Moderator


cron