How to customize WooCommerce product sorting

October 6, 2020

WooCommerce sort products

As a business-savvy online store owner, you probably already know that the order in which WooCommerce products are sorted and displayed on the front-end is essential to the success of your e-commerce store. It directly influences which items capture the customer’s attention first.

Allowing customers to sort your product list in different ways is also important. It enables you to help prospective customers find the products they want to purchase quickly and easily.

Essentially, WooCommerce product sorting forms a central part of your store’s navigation structure alongside other on-page elements such as the menu, keyword search, and product filters.

In this article, you will learn how to customize WooCommerce sorting on your online store using built-in options. You’ll also learn how to add more advanced product sorting to your e-commerce store using the WooCommerce Product Table plugin.

WooCommerce Product Table
The easiest way to let customers sort products in your WooCommerce store.

What product sort options are built into WooCommerce

Out of the box, WooCommerce gives store owners some basic product sort options. More specifically, you can do this in the following two ways:

WordPress Customizer

You can go to the CustomizerWooCommerceProduct Catalog to set the initial sort order of products in your online store using the WordPress Customizer. You can choose default sorting (custom ordering + name), popularity, average rating, most recent, and price.

WooCommerce shop page

Most WooCommerce-optimized themes display a basic sort dropdown at the top of the shop and category pages. Customers can use this to change the default sorting order by popularity, average rating, latest, price: low to high, and price: high to low.

The only problem is that the default product sorting options in WooCommerce are pretty limited. More specifically:

  • You can only sort WooCommerce products by a very restrictive list of values. The default options let you sort by popularity, average rating, latest, price: low to high, and price: high to low.
  • While you can choose how products are sorted, there’s no option to select the sort order.
  • The default options don’t improve the layout of your products or present them in a way that allows easy sorting or comparisons.

Thankfully, there’s a better way to let customers sort products on the front-end.

Product Table – the perfect WooCommerce product sorting plugin

The WooCommerce Product Table plugin provides a more flexible and effective way to sort products.

WooCommerce Product Table
The easiest way to let customers sort products in your WooCommerce store.

You can enable product tables globally on your shop and category pages. Alternatively, you can insert product tables using a shortcode to any page you’d like. This provides a better, more intuitive way to sort products throughout your store in just a few minutes.

Why use WooCommerce Product Table for product sorting?

  • Better layout. Instead of the basic grid layout that comes out of the box with WooCommerce, the WooCommerce Product Table plugin lets you list products in an intuitive, user-friendly table layout with multiple columns of information. This naturally lends itself to sorting WooCommerce products in a variety of different ways.
  • Tons of sorting options. WooCommerce Product Table lets you sort by many, many different types of product data. You can sort by product name, menu order, product ID, SKU, custom fields, price, popularity, reviews, date, and last modified date. In addition to this, you can also choose to sort products by any column in the table, or even randomly.
  • Set the sort order. For each sorting option, the WooCommerce Product Table plugin lets you choose the sort order using the orderby option. You can choose to sort the products either in ascending order or descending order. For example, you can sort products by product name in ascending order i.e. alphabetical sorting. This way, customers can quickly find products alphabetically.
  • Date sorting. As well as alphabetical sorting, you can set any column as a date column so that it is sorted correctly by date.
  • Customers can sort products. You can set the initial sort order for your products i.e. the default sort order when the page first loads. In addition, this WooCommerce sort products plugin also lets customers sort the products in ascending order or descending (or date) order simply by clicking on any of the table column headers.
  • Bonus options. The column sorting in WooCommerce Product Table works perfectly alongside the plugin’s other features which help prospective customers find products quickly and easily. These include the instant AJAX search box, the ability to choose the number of products per page, and WooCommerce product filters.

With WooCommerce Product Table, column sorting happens automatically as soon as you activate the plugin on your WordPress website. You can use the plugin options to change this as required.

How to set up product sorting

Once you have the WooCommerce Product Table plugin installed and activated on your WordPress website, you can set up WooCommerce product sorting. There are two ways to do this:

Method #1: Configure WooCommerce product sorting for all products

If you want to set the WooCommerce product sorting options for all products then you can simply configure the plugin’s settings. This way, the products on your main shop page and product category pages will follow the sort options and sort order you set in the WooCommerce Product Table settings page.

To do this, head over to WooCommerce → SettingsProductsProduct tables from the WordPress admin menu.

Scroll down till you reach the Sorting section. From here, you can set the sorting options. The Sort by option lets you set the initial sort order (i.e. orderby) that’s applied to the product table layout.

WooCommerce Product Table sort options

You can choose from the following options using the dropdown:

  • As listed in the Products screen (menu order)
  • SKU
  • Name
  • ID
  • Price
  • Number of sales
  • Average reviews
  • Date added
  • Date last modified
  • Other

If you select Other, you can specify which product table column you’d like to sort by. In other words, you can create a custom sorting order.

WooCommerce sort products

For example, if you sell clothes then you could sort by the attribute Sizes. Keep in mind that this only works if lazy load is disabled.

Once that’s done, use the Sort direction option to set the sort order. You can choose:

  • Automatic
  • Ascending (A to Z, 1 to 99)
  • Descending (Z to A, 99 to 1)

Click the Save changes button to continue. It might look something like this on the front-end:

WooCommerce sort products preview

Method #2: Configure WooCommerce product sorting for selected items

If you sell lots of products (or lots of different types of products) then you might want to sort some products in one way and others in another way. For example, you might want to sort clothes by Menu order and shoes by Price.

This is possible with the WooCommerce Product Table plugin. All you have to do is use the shortcode. Following our example, the shortcode might look something like this for products in the Clothes product category:

[product_table columns="image,name,short-description,price,add-to-cart" category="clothes" sort_by="menu_order" sort_order="asc"]

It would look like this on the front-end:

Sorted by menu order

And this for products in the Shoes product category:

[product_table columns="image,name,short-description,price,add-to-cart" category="shoes" sort_by="price" sort_order="asc"]

It would look something like this on the front-end:

Sorted by price

Simply add the shortcode to the page or post where you’d like to display the product table and click the Publish button.

Bonus: Order products using the menu order

The WooCommerce Product Table plugin lets you sort your products by the menu order. This gives you granular control over the order of products on your main shop page. You can set the menu order for your WooCommerce products directly from the WordPress back-end.

WooCommerce menu order

Go to WooCommerce → Products from the WordPress admin panel. Click on the Sorting tab. From here, you can simply drag and drop the products into place. The products that appear first in the list will appear at the top of the product table on the front-end.

Where to get the product sorting plugin

The product sort options you get out of the box with the WooCommerce plugin are pretty basic.

Using the WooCommerce Product Table plugin, you can set the initial sort order and let customers sort products themselves in a variety of different ways. Plus, you’ll have the option to configure the sorting settings globally or on a per-category basis.

WooCommerce Product Table
The easiest way to let customers sort products in your WooCommerce store.

Ready to sort products on your WooCommerce store, increase product visibility, and boost sales? Get the WooCommerce Product Table plugin today.

Maria Ansari

From C++ to PHP, the language Maria thinks in is code, and translates it to English for humans to understand. She has a degree in Computer Science and is the writer of choice for many organizations. She is also The Big Boss at BloggInc., calling all the shots and personally supervising every word and piece of content.

Please share your thoughts...

Your email address will not be published.