If you have many products and don’t want to use pagination (splitting the page in 1, 2, 3 or more pages), here’s the fix for you.

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

PHP Snippet: Change “Products per Page” @ Shop and Loop Pages

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

Some themes may affect this default figure:

  • by using a snippet similar to the one below
  • or by following the settings defined at WordPress Dashboard > Reading > “Blog pages show at most”.

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

/**
 * @snippet       Products per Page - WooCommerce Shop
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 3.6.2
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */

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;
}
Share:

Leave a Reply