WooCommerce Change Number of Products

This article describes how to change the number of products displayed within a WooCommerce shop.

  1. Log into WP-Dashboard
  2. Access the themes functions.php file by clicking Appearance > Editor > functions.php
  3. Add the following line of code to the top of functions.php
  4. Save the file and you’re all set 🙂
add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 24;' ), 20 );

Change “24” to the desired number of products to display


Changes made to any PHP file within a Theme will be lost when that theme is upgraded. We recommend using a Child Theme for all PHP updates. Child Themes Explained →