Website Building » WooCommerce » How Do I Increase the Number of Products Per Page in WooCommerce?

How Do I Increase the Number of Products Per Page in WooCommerce?

Last updated on January 14, 2023 @ 12:14 pm

There are a few things you can do to increase the number of products per page in WooCommerce. One is to simply edit the code in the WordPress back-end. The other is to use a plugin like WooCommerce Products Per Page.

1) Edit code in WordPress back-end

In your WordPress back-end, go to Appearance > Editor. On the right hand side, you will see a list of files. Find the one called WooCommerce.php and click on it.

PRO TIP: If you are using WooCommerce to sell products on your WordPress site, you may have noticed that the default number of products per page is set to 10. While this may be fine for some stores, others may want to increase this number to show more products on each page.

However, increasing the number of products per page can have a negative impact on your store’s performance. This is because each time a page is loaded, WooCommerce has to query the database to retrieve the products that are being displayed. So, if you have a lot of products and you increase the number of products per page, this can slow down your site.

Therefore, it is important to consider whether increasing the number of products per page is really necessary for your store before making this change. If you do decide to increase the number of products per page, we recommend doing so gradually so that you can monitor your site’s performance and make sure that it is not adversely affected.

On line 25, you will see a bit of code that looks like this:

$args = array(
'posts_per_page' => 12,
'columns' => 4, // Change this number to increase or decrease products per page
'orderby' => 'date', // You can also change this to 'rand' for randomly ordering products
);

The number after ‘columns’ dictates how many products are shown per page. So, if you wanted to show 6 products per page, you would change that line of code to read:

$args = array(
'posts_per_page' => 12,
'columns' => 2, // Change this number to increase or decrease products per page
'orderby' => 'date', // You can also change this to 'rand' for randomly ordering products
);

2) Use a plugin like WooCommerce Products Per Page

Another way to increase the number of products per page is by using a plugin. One popular option is WooCommerce Products Per Page. This plugin allows you to set how many products are shown per page, as well as which category they are shown in.

Drew Clemente

Drew Clemente

Devops & Sysadmin engineer. I basically build infrastructure online.