Change number of WooCommerce products per row

Defines where ‘first’ and ‘last’ classes are applied in product archives

/**
 * Snippet Name: Change number of WooCommerce products per row
 * Snippet URL: https://www.wpcustoms.net/snippets/change-number-of-woocommerce-products-per-row/
 */
  // Change number or products per row to 3

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

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x