adding filter to change # of columns
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 23 Nov 2015 17:32:02 +0000 (12:32 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 23 Nov 2015 17:32:02 +0000 (12:32 -0500)
functions.php

index 215b9c0..d8bf15c 100644 (file)
@@ -9,7 +9,13 @@
  * Initialize all the things.
  */
 require get_stylesheet_directory() . '/inc/init.php';
-
+// 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
+    }
+}
 
 /**
  * Do not add custom code / snippets here.