Skip to main content
Login Join
Snippet · PHP

Change WooCommerce Shop Page Products Per Page

Shared by Amit Dholiya · September 10, 2026 · @loop_shop_per_page

1 upvote
Back to Snippets

Control how many products WooCommerce displays on each Shop or product archive page.

Steps

  1. Add the code below to your theme’s functions.php.
  2. Change 12 to your preferred number.
  3. Save and refresh the Shop page.
/**
 * Change WooCommerce products per page
 */
function custom_woocommerce_products_per_page( $products ) {
    return 12;
}

add_filter( 'loop_shop_per_page', 'custom_woocommerce_products_per_page', 20 );
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments