From 08086522efd7f7d79c16dd738094c416f31ef81d Mon Sep 17 00:00:00 2001 From: Thuan Bui Date: Wed, 25 Oct 2017 09:00:54 +0700 Subject: [PATCH] Change product loop column to 3 --- functions.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index cea3ad0..91fa618 100644 --- a/functions.php +++ b/functions.php @@ -405,4 +405,12 @@ function themeprefix_cpt_layout() { return 'sidebar-content'; } } -add_filter( 'genesis_site_layout', 'themeprefix_cpt_layout' ); \ No newline at end of file +add_filter( 'genesis_site_layout', 'themeprefix_cpt_layout' ); + +// 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 + } +} \ No newline at end of file