WooCommerce is a popular plugin for WordPress that allows you to create an online store and sell your products. By default, WooCommerce displays 10 products per page on your shop page and product category pages. However, you may want to change this number to suit your needs and preferences. For example, you may want to show more products per page to reduce the number of pages your customers have to navigate, or you may want to show fewer products per page to improve the loading speed and performance of your site.

In this tutorial, We will show you how to change the WooCommerce number of products per page using two methods: using a plugin or using code snippets. Both methods are easy and effective, and you can choose the one that suits you best.

Method 1: Using a Plugin

One of the easiest ways to change the WooCommerce number of products per page is to use a plugin that does the job for you. There are many plugins available that can help you customize your WooCommerce store, but one of the most popular and reliable ones is [WooCommerce Product Archive Customiser]. This plugin allows you to change not only the number of products per page, but also the number of columns, the layout, the order, and the appearance of your product archive pages.

To use this plugin, follow these steps:

  1. Install and activate the plugin from your WordPress dashboard.
  2. Go to WooCommerce > Settings > Products > Display.
  3. Under Shop Page Display, you will see a new option called Products per page. Enter the number of products you want to display per page in this field.
  4. Save your changes and check your shop page and product category pages to see the effect.

Method 2: Using Code Snippets

Another way to change the WooCommerce number of products per page is to use code snippets. This method requires some basic knowledge of PHP and WordPress functions, but it gives you more control and flexibility over your WooCommerce store.

To use this method, follow these steps:

  1. Open your WordPress theme’s functions.php file using a code editor or a FTP client.
  2. Add the following code snippet at the end of the file:
// Change number of products per page
function bing_change_products_per_page( $per_page ) {
  // Set the number of products per page
  $per_page = 12;
  // Return the modified value
  return $per_page;
}
// Hook into pre_get_posts filter
add_filter( 'loop_shop_per_page', 'bing_change_products_per_page', 20 );
  1. In this code snippet, you can change the value of $per_page variable to any number you want. For example, if you want to display 16 products per page, change $per_page = 12; to $per_page = 16;.
  2. Save your changes and check your shop page and product category pages to see the effect.

We hope this blog tutorial was helpful for you. If you have any questions or feedback, please leave a comment below. Thank you for reading!

Categorized in:

Tagged in:

, ,