More Products per Page on Search Results
Shows a different number of products on product search results than on normal shop pages, so shoppers see more matches at once.
Opens WPIDE on
Code
$wpide_search_per_page = 36; // Products per page on search results.
add_filter( 'loop_shop_per_page', function ( $per_page ) use ( $wpide_search_per_page ) {
return is_search() ? $wpide_search_per_page : $per_page;
}, 20 );
Notes
Only affects product searches; shop and category pages keep their own setting.
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.