Products per Page on the Shop
Sets how many products are shown per page on the shop and product category pages.
Opens WPIDE on
Code
add_filter( 'loop_shop_per_page', function () {
return 24;
}, 20 );
Notes
Applies to classic shop templates. Block themes set this in the Product Collection block.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.