• Man, I have been racking my brain on this one, maybe someone can chime in with a little more knowledge of Woo.

    I want to change the number of products displayed per row depending on category. I am working with a photographer to setup his store and he shoots both vertical and horizontal panoramics. While I currently have the horizontals 3 to a row (want to keep this so they are not too small) I would like to have the verticals display 5 per row.

    Anyone know of a way to accomplish this? I was thinking an if/else statement or switch case but my tired eyes could not get it to work.

    All help is greatly appreciated!

Viewing 1 replies (of 1 total)
  • Thread Starter DesignLoud

    (@designloud)

    Anyone able to chime in on this? This is what I thought would work, maybe someone see’s something I am missing…

    add_filter('loop_shop_columns', 'loop_columns');
    if (!function_exists('loop_columns')) {
    function loop_columns() {
    	if (is_product_category('verticals')) {
    		return 4;
    	} else {
    		return 3;
    	}
    	}
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Woocommerce – Products per row’ is closed to new replies.