WooCommerce - excelling eCommerce
[resolved] Changing max number of products before pagination (11 posts)

  1. EnergyFreak
    Posted 2 years ago #


    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.



  2. EnergyFreak
    Posted 2 years ago #

    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 );
  3. partireper.it
    Posted 2 years ago #

    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.

  4. maximan
    Posted 2 years ago #

    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.

  5. partireper.it
    Posted 2 years ago #

    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.


  6. Matt
    Posted 2 years ago #

    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/

  7. Kitchendoorcentre
    Posted 2 years ago #

    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.

  8. tongny
    Posted 2 years ago #

    Wow great,


  9. Palexandra
    Posted 2 years ago #

    Just what I was looking for! A life saver! :D

  10. 012birds
    Posted 2 years ago #

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

  11. adevandry
    Posted 1 year ago #

    Matt, the code itself says "Goes in functions.php"

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic