Change the number of products displayed per page in WooCommerce

This code snippet changes the number of products displayed per page in the WooCommerce shop. In this case, the number of products is set to 12.

PHP

add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 12;' ), 20 );

Snippet Feedback

Did this snippet work for you? Do you have any questions about this snippet? Leave some feedback below.

Did it work?

Save Snippet

Embed Snippet

To embed this snippet on your site, copy this html code and paste into your webpage. Learn more
By embedding snippets on your site, you are agreeing to our terms and conditions.

Embed Snippet

To embed this snippet on your site, copy this html code and paste into your webpage. Learn more
By embedding snippets on your site, you are agreeing to our terms and conditions.

Embed Snippet

To embed this snippet on your site, copy this html code and paste into your webpage. Learn more
By embedding snippets on your site, you are agreeing to our terms and conditions.