Support » Plugin: WooCommerce » Different Number Products/Subcategories per Row, Same Page

  • Hi,

    I’ve been trying to figure out how to change the loop counts for products and categories items to no avail. I would like for product items to be 5 per row and category items to be 3 per row and I would like for this to happen when they are both listed on category pages.

    I’ve tried duplicating content-product.php, and content-product_cat.php on my theme and giving them different loop numbers. This works for giving different loop counts on category/product archives, but it doesn’t work with individual items on the category archives.

    I’ve also tried throwing the code

    // 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

    with if/else statements for products/categories, but the same results happen.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Different Number Products/Subcategories per Row, Same Page’ is closed to new replies.