How To Show All Products On One Page In WooCommerce

This guide explains how to disable WooCommerce pagination so your category pages display every product at once. The provided code snippet modifies the main query to remove page limits, creating a seamless scrolling experience for your customers.

What Is WooCommerce Category Pagination?

WooCommerce category pagination is a standard navigation system that breaks your product archives into multiple, separate pages. WordPress enables this by default to prevent slow loading times, forcing users to click numbered links (like "Page 1 of 5") to see more items.

Why Disable Pagination On Category Pages?

Pagination interrupts the natural shopping flow because every click requires a full page reload. Removing these breaks allows mobile users to scroll vertically through your entire catalog, which often reduces bounce rates and encourages deeper browsing.

How Does The Disable Pagination Code Work?

This PHP snippet intercepts the main WordPress query before it runs to detect if the user is viewing a product category. It then resets the posts_per_page limit to -1, which instructs the database to fetch and display every matching product in a single loop.

add_action( 'pre_get_posts', 'ul_disable_category_pagination' );

function ul_disable_category_pagination( $query ) {
    // Check context (Frontend + Main Query + Product Category)
    if ( ! is_admin() && $query->is_main_query() && is_product_category() ) {
        // Set posts per page to -1 (All)
        $query->set( 'posts_per_page', -1 );
    }
}

Where Do I Add The PHP Snippet?

You can safely add this code to your child theme's functions.php file or use a snippet manager like the WPCode plugin. I recommend using a plugin because it keeps your custom code active even if you switch or update your website's theme.

What Are The Performance Risks?

Warning: Loading hundreds of products on a single page creates a large DOM size that can strain server resources. Mobile browsers often struggle to render excessive images simultaneously, so this method works best for smaller catalogs.

Does Infinite Scroll Offer A Better Solution?

Infinite scroll provides a similar seamless experience but loads content dynamically via AJAX to save bandwidth. While disabling pagination is easier to implement, infinite scroll is technically superior for site speed and performance on large stores.

How Does This Affect WooCommerce SEO?

Consolidating products onto a single URL concentrates link equity. Deep pagination chains dilute value. Single-page archives help search bots crawl inventory efficiently. This structure lowers the cost of information retrieval. Such efficiency is a core component of an SEO service.

Can I Target Specific Categories Only?

Yes, you can modify the conditional logic in the code to target specific category IDs. This allows you to show all products for small, curated collections while retaining standard pagination for your larger, heavier categories.

Is This Compatible With All Themes?

Most standard themes respect the main pre_get_posts query modification used in this snippet. However, custom page builders like Elementor often use their own internal loops, so you may need to adjust the element's settings directly.

Does Disabling Pagination Change Category Layouts?

The visual grid layout remains consistent with your theme's design, but the list expands vertically. Your existing CSS styles will automatically apply to the new rows, so no design changes are required.

Graham McCormack SEO Wirral
Graham McCormack

About Me

Meet Graham McCormack

I’m Graham McCormack, a technical SEO consultant with nearly 20 years of hands-on experience helping businesses recover, grow, and dominate online
I’ve been in SEO since 2008 — long before it became the trendy digital marketing buzzword it is today. Back then, I was getting my hands dirty figuring out how websites worked, why some pages ranked and others didn’t, and how to reverse-engineer Google’s behaviour.

I didn’t learn SEO from a course or some TikTok guru. I learned it by doing it. Over and over again.

Since then, I’ve worked with all kinds of businesses — from local trades on the Wirral to eCommerce giants and high-stakes lead generation sites. I’ve built my own ranking systems, tested what works (and what doesn’t), and developed a forensic approach to SEO that cuts through the noise.

This site, Graham SEO, is where I offer real SEO consultancy. Not vague monthly retainers. Not “content packages.” Just smart, strategic work that gets results.
ECommerce SEO Services

ECommerce SEO Services

What’s Included:
  • SEO audits with a focus on ecommerce platforms

  • Optimising product, category and filter pages

  • Structured data implementation (schema markup)

  • Improving site speed and mobile usability

  • Link building strategies that support product visibility

  • Duplicate content checks and canonicalisation

  • Conversion-focused keyword targeting

  • Monthly performance and ranking reports

  • No long-term contract, complete flexibility

Who Ecommerce SEO Is For:

  • Shopify and WooCommerce stores

  • Businesses with growing product ranges

  • Online retailers who want organic growth, not just paid ads

You’ve built the store. Now let’s get the right people in front of it — and make sure they convert.

Graham SEO Logo Light - black
Graham SEO delivers expert strategic SEO, professional audits & consultancy for businesses that want results without the fluff.

Opening hours

Monday: 09:00 - 18:00

Tuesday: 09:00 - 18:00

Wednesday: 09:00 - 18:00

Thursday: 09:00 - 18:00

Friday: 09:00 - 18:00

Company info

Graham SEO Ltd

Company No.10710878

VAT No. 349888132

Office 2, Oaktree Court Business Centre

Mill Ln, Little Neston, Ness

Cheshire, CH64 8TP

Tel: 0333 335 5902

Copyright © Graham SEO Ltd 2026. All Rights Reserved

Sitemap | Privacy | Terms of Service | Cookie Policy