March 30, 2023

How to show all products on one page WooCommerce

https://tamimwahid.com/wp-content/uploads/2020/04/trydo-blog-new-10-3.jpg

You can control how many products to show in WooCommerce by changing the “Products per page” setting in the WooCommerce settings.

Alternatively, you can use the following code in your theme’s functions.php file to customize the number of products to show per page:

add_filter( 'loop_shop_per_page', 'custom_products_per_page', 20 );

function custom_products_per_page( $number ) {
    // Change the number of products per page to 999
    $number = 999;

    return $number;
}

In this example, the number of products per page is set to 12. You can adjust the number to your desired value.