Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

How to Change the Number of WooCommerce Products Displayed Per Page

Learn how to change the number of WooCommerce products displayed per page

If you want to change the number of products dispalyed per page in WooCommerce,
There is no option to do this easily.

You can do this by adding your Code Snippets.

1. Install Code Snippets Plugin

I’m using WPCode to manage code snippets in WordPress. Install and activate it.

2. Add new snippet

Click [Code Snippets] -> [+ Add Snippet] menu from left side menu.

And create new snippet using [Add Your Custom code (New Snippet)].

Select 'Add Your Custom Code (New Snippet)' from library in WooCommerce.
Select ‘Add Your Custom Code (New Snippet)’

Set title as your want, select Code Type to PHP Snippet.

And Insert below code

// Change the Number of WooCommerce Products Displayed Per Page
add_filter( 'loop_shop_per_page', 'my_loop_shop_per_page', 30 );

function my_loop_shop_per_page( $products ) {
 $products = 15;
 return $products;
}

Save and Activate your new snippet.

Leave a Reply

Your email address will not be published. Required fields are marked *