Updated: September 19, 2019
A client recently wanted to customize the product sort order of their WooCommerce products on the product category archive page. The archive used the default alphabetical sorting, but they had a few products that they wanted to be listed at the top of the category listing. Here’s how we did it.
Product Sorting Options
WooCommerce offers the ability to customize the sorting order of products with a few settings changes.
Go to Appearance > Customize in your WordPress admin. Once the Customizer opens, go to WooCommerce > Product Catalogue. This is where you will find your options for sorting products. Ensure that Default Product Sorting is set to “Default sorting (custom ordering + name)”. Publish the new settings and then go to edit an individual product.
[In previous versions of WooCommerce, this is how you would get to that setting: Go to WooCommerce > Settings in your WordPress admin. On the Products tab, click on the Display settings.]
Custom Sorting
All custom sorting is applied against all items and not against separate categories. Keep this in mind if you have a page that displays all products. For this particular project, the product pages were separated by category, so the sorting options didn’t need to be as detailed as others may need.
From the Products admin panel, you can select Sorting and then drag and drop your products in the specific order that you’d like. You can also order the products in the Quick Edit menu by changing the “Order” value. All items default to the value zero. The custom order displays the lower numbers first. You can also edit the order value in the Product Data > Advanced tab on the product edit page.
Move Specific Products to the Top
If you want to custom sort each and every product, you may do so. If you simply want to move a few select items to the top of the list, there is an easy way to do that.
Enter a negative number in the “Order” field of the product. By using a negative number, the item will have a lower value than the default “0” and therefore will show above those items. If you want to lump a group of products together and have WooCommerce sort them alphabetically, just use the same “order” value.
Conclusion
WooCommerce is a powerful e-commerce solution for WordPress and provides lots of ways to customize your online store.
Need Help with WooCommerce?
We offer web development services for WooCommerce and can build a custom WooCommerce extention that meets your exact needs.
Yeah, that will be a solution, but what if you run a website with hundred or maybe thousand of products? It become a nightmare to maintain. Personally i use the Advanced Post Types Order which feature a drag a drop interface which makes the sorting process elementary.
That is fantastic, thanks.
Also, do you have any idea how one could sort related products manually? Would this method work on that as well?
Good tip. Might have helped to also say that once you have done this any products left with a 0 rating will be sorted alphabetically.
Also this workaround is not picked up by widgets and only shows when a specific category is selected.
Thanks for this post
Does the job
Thanks, this is a really good method to change how products are sorted. It’s funny how few people know how to do this!
For more sorting methods, you can also use the WooCommerce Product Table plugin (a href=”https://barn2.co.uk/wordpress-plugins/woocommerce-product-table/”>barn2.co.uk/wordpress-plugins/woocommerce-product-table) to list products in a table. The table can contain whichever columns of data you like, and customers can sort by any column. There are also options to set the default sort order, which you can do by any column and in any order. So it offers even more flexibility for anyone looking for this.
Is there a way to export all products to a CSV file, manage the menu order of products, and then re-import them to update those products?
how to delet any sort item i want?
Advanced Post Types Order plugin is a far away easier method to customize the order.. Why do things hard when there’s an easy way https://www.nsp-code.com/premium-plugins/wordpress-plugins/advanced-post-types-order/
Very helpful! THANK YOU!!!
Just ran into you article, it actually helped me.
thanks 🙂
Thanks for this post, I solved my client request now 😀
Great instructions Tim, I’d just add in a recent update WooCommerce have moved the “Default Product Sorting” options to the customizer,
Cheers
Chris
Great instructions Tim, I’d just add in a recent update WooCommerce have moved the “Default Product Sorting” options to the customizer
Great article, I was searching for this allover the internet. it really helps in customizing my store. Thanks .
Thank you!!!