Menu Close

WooCommerce: Change Number of Products Per Page


If you’re not happy with the default number of products per page (16), or if your theme overrides the default WooCommerce setting for “per_page” products and you need to change it, here’s the fix for you.

Please note that you may also need to set the number of WooCommerce product grid columns, so that you can make sure the total number of products per page is a multiple of that and you don’t leave the shop page with empty grid items.


Edit the number of WooCommerce products per page (12 in this case)

PHP Snippet: Change “Products per Page” @ WooCommerce Shop

The default number of products per page is 4 rows * 4 columns = 16 products.

Some themes may affect this default setting by using a snippet similar to the one below – in such case try to increase the “9999” priority to a greater number.

In the snippet below, simply define the number of products per page by changing “12” to whatever number you like.

 * @snippet       12 Products per Page - WooCommerce Shop
 * @how-to        Get FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 7
 * @donate $9

add_filter( 'loop_shop_per_page', 'bbloomer_redefine_products_per_page', 9999 );

function bbloomer_redefine_products_per_page( $per_page ) {
   $per_page = 12;
   return $per_page;
View Source
Posted in WooCommerce Tips