Change number of products-per-page in WooCommerce

WooCommerce
// PHP

What it does

In this example, we will change the number of products-per-page to 24.

The Code

add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 24;' ), 98 );

How To Use It

Paste this snippet into your theme's functions.php or in a WordPress plugin.

Menu