Just started playing around with Woocommerce, ran into a problem. I have a bunch of items (100+) and all of them only have a number as product title, 1,2,3 etc. The problem is that Woocommerce outputs the products like this: 1,11,12,13,14,15,16,17,18,19,2,20 – and so forth. How can I make it output correctly?
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
You'll either have to sort/order your products manually or create a custom sort order within WooCommerce. For that take a look at the WooCommerce docs and this snippet for doing just that. In this case you're also going to have to do a bit of MySQL manipulation as well so that you're sorting the numbers numerically. See this post on stackoverflow for an example. NOTE: You may have some performance issues with the MySQl as a result. |
|||||||||
|
