How to change the WooCommerce number of products per page

How to change the WooCommerce number of products per page

One of the greatest advantages of WooCommerce is its variety of customization options. You can set up the appearance of your page in almost every aspect, which is excellent for customizing the product pages.

This article created by our team at WpDataTables will explore WooCommerce’s customization options, starting with the customization of WooCommerce’s number of products per page. How do you change the number of products per page?

This can be a very useful change for your website. For example, if the number of products currently showing on the page is damaging the functionality of the page, or if changing the number would increase the visibility of products, this can visually enhance your site.

It’s important to know how the WooCommerce number of products per page work, and how to change the number. A quick fix would be pagination, but if you don’t want to do that, this is what you can do to change the WooCommerce number of products per page.

Why Change the WooCommerce Number of Products per Page?

So when is it useful to change the default number of products per page?

  • When you want to increase your sales by displaying more information about each individual product, or if you want to change the overall display of your page. By default, the number of products on a page will be 16, and they will be displayed in 4 rows by 4 columns.
  • It makes it easier for your shoppers to scroll through your products and find what they are seeking, especially if you have many products to display. Users will get easily lost in a flood of products that they don’t want to buy. They’ll lose patience as they trawl through multiple pages of products before finding their preferred product.
  • To make your page more functional. This could be because you have too many products on your page, and various images or widgets do not pop up properly. Or, you are changing the image sizes that you want to display.

How to Change the WooCommerce Number of Products per Page

There are two easy solutions to this problem for WooCommerce users. You might be limited by your site’s theme, and some themes only allow for a few solutions that we’ll explain here.

Before commencing, it is vital to backup everything on your page, by backing up the functions.php file. It would also make sense to have a child theme in place, or everything might disappear after a while.

Here are two ways to change the number of products per page.

Solution #1: With the Theme Customizer

The easiest way to change the WooCommerce number of products per page is by changing the theme’s settings, however, first make sure your theme allows it. If it doesn’t, move on to the second solution.

If it does, follow these steps.

  • Go to your admin area in WordPress. Hover over the Appearance button.
  • A drop-down menu should appear where you can find the Customize option. Open it, and the WordPress theme customizer tool should open.

  • In the left sidebar, click on WooCommerce. Then, go to Product Catalog, and scroll down the left-hand side, where you can see the Products per Row Then, you can set the number of products per page to the preferred number. You can also customize the number of rows per page.
  • If this doesn’t appear in your theme’s customizing tool, then the theme doesn’t allow this option, so try the second solution!

Solution #2: With a Filter

This option is for everyone whose theme does not allow them to customize the products per page. You can use a very simple code snippet and incorporate it into your functions.php file. Simply follow these steps.

  • Go to your WordPress site’s files, and locate the child theme’s functions.php file. Normally, it should be located in /public_html/wp-content/themes/YourThemeName-child/functions.php.
  • If you’re using an add-on domain, then this folder will be: /public_html/YourDomain/wp-content/themes/YourThemeName-child/functions.php.
  • Then, you should add this code snippet on the bottom of the file, or before the closing tag. Here’s the code you’ll need to enter.
 /**
* Change number of products that are displayed per page (shop page)
*/

add_filter( 'loop_shop_per_page', 'new_loop_shop_per_page', 20 );
function new_loop_shop_per_page( $cols ) {
  // $cols contains the current number of products per page based on the value stored on Options -> Reading
  // Return the number of products you wanna show per page.
  $cols = 9

return $cols;
  • Update the file, and save it. With this filter, you’ll now enable your users to see 9 products per page.
  • You can always modify the number to any value you want. To do that, change the value in $col = 9 to any value you want.

 

Hey, did you know data can be beautiful too?

wpDataTables can make it that way. There’s a good reason why it’s the #1 WordPress plugin for creating responsive tables and charts.

An actual example of wpDataTables in the wild

And it’s really easy to do something like this:

  1. You provide the table data
  2. Configure and customize it
  3. Publish it in a post or page

And it’s not just pretty, but also practical. You can make large tables with up to millions of rows, or you can use advanced filters and search, or you can go wild and make it editable.

“Yeah, but I just like Excel too much and there’s nothing like that on websites”. Yeah, there is. You can use conditional formatting like in Excel or Google Sheets.

Did I tell you you can create charts too with your data? And that’s only a small part. There are lots of other features for you.

Changing the Number of Columns per Page

You can also change the number of columns per page; the above code will only change the number of products per page. You can easily change the default number of columns, which is 3, with the following code snippet:

// Change the Number of Columns Displayed Per Page
add_filter( 'loop_shop_columns', 'lw_loop_shop_columns' );
function lw_loop_shop_columns( $columns ) {
 $columns = 5;
 return $columns;
}

Enter this code snippet into the functions.php file. You can change the number of columns to any number you want; for example, if you want to set it to more than 5 columns, you can simply change the number after $columns =.

In this example, the number of products is changed to 12, and the number of columns to 5.

Create responsive tables, graphs, and charts for WordPress

If your business is growing and sales are increasing, then you can offer your users the chance to compare the products. You can also display comparisons, pricing tables, statistics, or other data with tables.

For this task, wpDataTables is recommended. It is a premium WordPress plugin for creating responsive tables, graphs, charts, which enables comparison of products and provides the data for your users.

Creating a table or a chart with the plugin is as easy:

  • Create the data.
  • Customize the table and add responsive elements, conditional formatting, multi-criteria filtering, and more.
  • Publish the table on your site, and enjoy the results.

FAQs about the WooCommerce number of products per page

1. How can I change the number of products displayed per page on my WooCommerce store?

By navigating to the “Products” tab in your WordPress dashboard, selecting “Screen Options” in the upper right corner, and modifying the “Number of items per page” setting, you may modify the number of products displayed on each page in WooCommerce.

2. Is there a maximum limit to the number of products I can display per page in WooCommerce?

Although WooCommerce does not have a hard restriction on the number of products you can show per page, it’s crucial to remember that showing too many products may cause your site to load slowly and may negatively affect user experience.

3. How does changing the number of products per page affect the page load speed of my WooCommerce store?

WooCommerce page load times may go longer if there are more products per page since more products need to be loaded and shown on the page. The user experience may be impacted by this, especially on devices with weaker processors or slower internet connections.

4. Can I set different numbers of products per page for different product categories in WooCommerce?

Yes, by going to the “Products” tab, selecting “Categories,” and changing the “Products per page” setting for each category, you can set different numbers of products per page for various product categories in WooCommerce.

5. What is the default number of products per page in WooCommerce and can I change it?

By following the instructions in question 1, you can easily modify the default setting in WooCommerce, which is 12 products per page.

6. Will changing the number of products per page affect my WooCommerce store’s SEO?

Although search engines prioritize variables like content quality and relevancy when ranking pages, changing the number of products per page in WooCommerce is unlikely to have a substantial influence on your store’s SEO.

7. Can I add pagination to my WooCommerce store if I have a large number of products per page?

Sure, you may use a plugin or custom web code to add pagination to your WooCommerce store. By facilitating clients’ easier navigation across a huge number of products, pagination can enhance user experience.

8. How can I optimize the layout of my WooCommerce store to accommodate more products per page?

You might think about utilizing a grid or column-based structure, including filters or sorting options, and making sure your site is mobile-friendly to optimize your store’s layout for a greater number of products per page.

9. Is there a plugin available to help me customize the number of products per page in WooCommerce?

Absolutely, a number of plugins, such as “WooCommerce Items Per Page” and “Custom Product Quantity for WooCommerce,” are available to assist you to change the number of products displayed on each page in WooCommerce.

10. How can I ensure that my WooCommerce store remains responsive and user-friendly with a high number of products per page?

You can optimize your site’s performance, use a simple and streamlined design, and offer clear navigation and filtering options to help customers find what they’re looking for quickly and easily to make sure that your store remains responsive and user-friendly even with a high number of products per page.

Ending thoughts on changing the number of products per page in WooCommerce

Only use code snippets from reliable sources such as WordPress Codex, Github, or Stack Overflow to ensure no mistakes are made. Their developers have a lot of experience, and you can contact them anytime if there are any problems.

You can also use child themes for this. You can create child themes and easily make the changes you desire. The parent theme will remain intact, and you’ll be able to make easy but effective changes.

If you enjoyed reading this article on how to change the WooCommerce number of products per page, you should check out this one about how to set WooCommerce related products.

We also wrote about a few related subjects like how to export export WooCommerce orders, WooCommerce product variations, WooCommerce appointments plugins, WooCommerce redirect after checkout, how to set up WooCommerce test mode, WooCommerce grouped product, WooCommerce variable product,  WooCommerce hide category from shop page and the best WooCommerce extra product options.


Up Next:

How to Do a Great Product Comparison Page (Best Practices)

How to Do a Great Product Comparison Page (Best Practices)