Set how many products appear on each shop and category page in classic themes.
add_filter( 'loop_shop_per_page', function (): int {
return 24; // Pick a number that divides evenly by your column count.
}, 20 );
Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.
Classic themes show a set number of products per shop page, often 12 or 16. This snippet sets your own number.
The loop_shop_per_page filter sets the number of products in the main shop query on the shop, category, tag and product search pages. It runs at priority 20, after most themes set their own default.
Open the shop and count the products on the first page, or look at “Showing 1–24 of N results”.