0

Related question: change-the-number-of-products... Using code from Woo Docs

I can specify the number of items per page, but sometimes fewer items appear. I suspect that this code selects the desired number of items from the database without considering quantity available, then some part of the system removes any items that have quantity less than 1, and displays what's left.

// Display 24 products per page. Goes in functions.php
add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 24;' ), 20 );
  1. Am I correct?
  2. How do I make it REALLY display the desired number of items per page?

Yes, I understand that the last page might have fewer items. That should go without saying, but I figured it best to be specific. I'm talking about pages besides the last page.

Community
  • 1
  • 1
TecBrat
  • 3,643
  • 3
  • 28
  • 45

1 Answers1

0

My problem was apparently related to an update. I hadn't noticed a notification in admin that I needed to do a data update. (I forget the actual wording.) The data update migrates some legacy settings to the new settings. There was a button to start it, which put it into a background task but gave a link to make it happen "now". I clicked that link. It did it's thing. My problem is apparently solved.

TecBrat
  • 3,643
  • 3
  • 28
  • 45