Support » Plugins and Hacks » [Resolved] Changing max number of products before pagination

[Resolved] Changing max number of products before pagination

  • Hi,

    I would like to know how I can change the max number of product per page onto the “shop” page before they start showing up on the next page? Right now, after 8 products, it automatically starts a new page. I want to change this to 16 products and 4 columns. I am currently using the bonfire theme, not sure if this is a theme change or a woocommerce change.



Viewing 10 replies - 1 through 10 (of 10 total)
  • Here is the solution if anyone wants to know:

    // Display 24 products per page. Goes in functions.php
    add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 24;' ), 20 );

    Hi EnergyFreack,
    does this affect also the category page?
    At the moment my standard woocommerce only displays 3 product per sub category page and I wouls like it to show all of them.
    Please advise.

    Another question related to this thread. I have successfully changed the number of products per page by adding the above code to the Theme functions php. However, regardless of whether or not I change the number per page there is blank padding below the products list, see here:


    Any suggestions what might be causing this and how to prevent. TIA.

    Hi Maximan and thanks for your input.
    I managed to get around the products page limit by putting my products into categories: http://www.partireper.it/prodotti/

    My problem is, if I enter any of the categories with more than 3 products, woocommerce only displays 3 products per subcategory page and this is way too unconfortable.

    I wish I could find a way to make woocommerce display all the products in one subcategory page.


    Cannot seem to locate where to put this code, regardless, wherever I do added, it doesn’t work. For example, I have added it to: woocommerce/woocommerce.php = nothing. Added it to: woocommerce/woocommerce-functions.php = Nothing (I should add that when I click on that file WordPress shows this, “Editing woocommerce/woocommerce-functions.php (inactive)”)

    Please advise.

    Here’s the site: http://www.greyley.com/shop/

    Thanks EnergyFreak

    Works a treat been looking for this for ages.

    Matt you need to place it in your themes functions.php


    Thats what worked for me hope it helps.

    Wow great,




    Just what I was looking for! A life saver! 😀



    Does anyone know how to set the limit for sub categories? Like show 12 subcategories and then paginated.

    Matt, the code itself says “Goes in functions.php”

    Put it in your theme’s functions.php file.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] Changing max number of products before pagination’ is closed to new replies.