how to customize product sorting in woocommerce

Jonathan Starr

7

February, 2018

Sometimes you need that perfect product sorting setup. The client will want specific products in a specific order. While this is not the easiest thing as there is a lot of manual work that has to be done, you do get to avoid having to place each product individually on the page which would make for a colossal mess.

WooCommerce offers the ability to customize the sorting order of products with the adjustment of just a few settings. You can affect as many or as little products as you would like.

First off, go to WooCommerce > Settings in your WordPress admin. On the Products tab, under the Display settings, ensure that Default Product Sorting is set to “Default sorting (custom ordering + name)”. Save the settings, then click on the Products page page from the WordPress sidebar.

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 Sort Products 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.