How to Set Products Per Page in WooCommerce
This guide shows you how to control how many products appear on shop and archive pages in WooCommerce. By default, WordPress shows 10 products per page, but you can change this to any number to improve browsing, reduce scrolling, or match your store’s design. You’ll need access to your WordPress admin dashboard; no coding experience is required for the simplest method.
What You’ll Need
- WordPress admin access (at least an Editor or Shop Manager role).
- An active WooCommerce plugin (any recent version).
- Optional: FTP or file manager access if you choose the code method.
Step-by-Step
- Log in to your WordPress dashboard. Go to
wp-adminand enter your credentials. - Navigate to WooCommerce settings. In the left sidebar, hover over “WooCommerce” and click “Settings.”
- Open the Products tab. In the settings page, you’ll see tabs at the top: General, Products, Shipping, Payments, etc. Click “Products.”
- Find the “Default customer location” section (not needed). Scroll down past the general product options until you see the “Pagination” section. It’s usually below “Product data” and “Inventory”.
- Set the “Products per page” field. In the “Pagination” section, there’s a text field labeled “Products per page.” Enter the number of products you want to display per page. For example, type
12or24. Do not include commas or words. - Save changes. Click the blue “Save changes” button at the bottom of the page. A success message will appear.
- Test your shop page. Visit your shop page (or a product category page) to see the new count. If you don’t see a change, clear your browser cache and any caching plugin.
Alternative method using a code snippet (for more control):
- Add a filter to your theme’s functions.php. Go to Appearance → Theme File Editor, select
functions.phpfor your active theme, and add the following code at the end:
add_filter( 'loop_shop_per_page', function( $cols ) {
return 16; // Change 16 to your desired number
}, 20 );
- Update the file. Click “Update File.” If you’re using a child theme, add the code to the child theme’s functions.php instead. This method overrides the setting from WooCommerce settings.
Common Mistakes
- Setting the number to 0 or leaving it blank. This can cause WooCommerce to fall back to the default (10) or show all products, which may slow down your site. Always enter a positive integer.
- Editing the wrong file. If you use the code method and accidentally edit a plugin file, your changes will be lost on update. Always use a child theme’s functions.php or a code snippet plugin.
- Not clearing caches. Many caching plugins (e.g., WP Rocket, W3 Total Cache) store a static version of your shop page. After changing the number, purge all caches or the old number may still appear for visitors.
- Conflicting with a theme option. Some themes (like Flatsome, Woodmart) have their own “Products per page” setting that overrides WooCommerce. Check your theme’s customizer or options panel for a similar setting.
Tips
- Consider user experience. A good number is between 9 and 24. Too many products per page can increase load time; too few forces more clicks.
- Use a code snippet plugin. Instead of editing functions.php directly, use a free plugin like “Code Snippets” to add the filter. This is safer and easier to manage.
- Set different numbers for different pages. If you want a different count for, say, the shop page vs. category pages, you can add conditional logic in the code snippet (e.g., using
is_shop()). - Test with a staging site. If you’re not comfortable making changes on a live site, duplicate your site to a staging environment first.
Troubleshooting
Problem: The number doesn’t change on the front end.
- Clear your browser cache and any caching plugin (e.g., WP Super Cache, LiteSpeed Cache).
- Check if your theme has a separate “Products per page” setting. Look in Appearance → Customize → WooCommerce or Theme Options.
- Try the code snippet method instead of the settings field. If the code works, the settings field might be overridden by something else.
Problem: The shop page shows no products at all.
- This can happen if you set the number to 0 or if a filter returns 0. Go back to WooCommerce settings and set a positive number (e.g., 10) and save.
- If you used a code snippet, remove it temporarily to see if it fixes the issue.
Problem: The change only applies to some pages.
- Make sure you’re checking a product archive page (shop, category, tag) and not a static page that uses a page builder. If you’re using a page builder like Elementor, the product grid might be controlled by the widget settings, not WooCommerce.
Problem: After updating WooCommerce, the setting resets.
- WooCommerce updates rarely reset settings, but if it happens, it might be due to a conflict. Deactivate all plugins except WooCommerce and test. If the setting holds, reactivate plugins one by one to find the culprit.
Frequently Asked Questions
Can I set a different number of products per page for each category?
Yes, but not with the default settings. You’ll need a code snippet that checks the current category and returns a different number. For example, using is_product_category('shirts') to return 12, and 24 for others.
Does this setting affect the number of products shown in the admin product list?
No. The admin product list in WooCommerce has its own screen options (usually 20 per page). This setting only affects the front-end shop and archive pages.
What is the default number of products per page in WooCommerce?
By default, WooCommerce displays 10 products per page. This is set by WordPress’s reading settings, not WooCommerce itself.
Can I set the number to “All” to show every product on one page?
You can set a very high number (e.g., 999) to effectively show all products, but this is not recommended for stores with many products as it will slow down page load and overwhelm users.
Why is my shop page showing 3 columns instead of the number I set?
The number of columns is controlled separately by the theme or by WooCommerce’s “Products per row” setting. This is not the same as “Products per page.” Check your theme’s customizer for column settings.
Will this setting affect the number of related products on a single product page?
No. Related products have their own filter (woocommerce_output_related_products_args). To change that, you’d need a separate code snippet.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.