Ready to get started?Download WordPress


WooCommerce - excelling eCommerce
Different Number Products/Subcategories per Row, Same Page (2 posts)

  1. justarhymes
    Posted 1 year ago #


    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.


  2. justarhymes
    Posted 1 year ago #

    Still having trouble with this. Any help would be very appreciated, if it's possible.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.