Title: Sorting by availability
Last modified: August 30, 2016

---

# Sorting by availability

 *  Resolved [dogmatix72](https://wordpress.org/support/users/dogmatix72/)
 * (@dogmatix72)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/sorting-by-availability/)
 * Hello,
 * I have the option in WC, i set to availability, when viewing products availability
   is the default, but it doesnt seem to be sorting. I have product displaying out
   of stock (using the [https://wordpress.org/plugins/woocommerce-sold-out-products/](https://wordpress.org/plugins/woocommerce-sold-out-products/))
   but they appear mixed in with the products in stock?
 * [https://www.blueticking.co.uk/product-category/childrens-vintage-funky-chairs/childrens-vintage-funky-chairs-stools/?orderby=by_stock](https://www.blueticking.co.uk/product-category/childrens-vintage-funky-chairs/childrens-vintage-funky-chairs-stools/?orderby=by_stock)
 * I have the latest version of woocommerce and wordpress.
 * Kind regards,
 * Craig
 * [https://wordpress.org/plugins/woocommerce-extra-product-sorting-options/](https://wordpress.org/plugins/woocommerce-extra-product-sorting-options/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Beka Rice](https://wordpress.org/support/users/bekarice/)
 * (@bekarice)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/sorting-by-availability/#post-6648512)
 * [@dogmatix72](https://wordpress.org/support/users/dogmatix72/) interesting, haven’t
   seen something like this before — [could you fill out our support form](https://www.skyverge.com/contact/?form_type=support&purchased=wordpress)
   and include admin credentials so we can take a deeper look at this? I’m not able
   to replicate the issue on a test site. Thanks!
 *  [danigirol](https://wordpress.org/support/users/danigirol/)
 * (@danigirol)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/sorting-by-availability/#post-6648516)
 * Hola buenas, a mi me pasa lo mismo, sort by availabily no me lo hace que hay 
   algun bug??
 *  [ChrisColston](https://wordpress.org/support/users/chriscolston/)
 * (@chriscolston)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/sorting-by-availability/#post-6648565)
 * I have a similar issue whereby I can create the custom sort filters I want (Name:
   A-Z and Availability) but can’t seem to combine them so they display alphabetically
   and at the same time ‘move’ out of stock to the last items in the list. Is this
   possible?
 * [http://bondsjewellery.co.uk/product-category/luxury-watches/](http://bondsjewellery.co.uk/product-category/luxury-watches/)
 *  [matteo raggi](https://wordpress.org/support/users/whichtransfers/)
 * (@whichtransfers)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/sorting-by-availability/#post-6648566)
 * I have the same trouble here [http://spesagodina.it/web/prodcut-category/gusto-piu/pizze/](http://spesagodina.it/web/prodcut-category/gusto-piu/pizze/)
   please help!
 *  Plugin Author [Beka Rice](https://wordpress.org/support/users/bekarice/)
 * (@bekarice)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/sorting-by-availability/#post-6648567)
 * Hey [@chriscolston](https://wordpress.org/support/users/chriscolston/) and [@matteo](https://wordpress.org/support/users/matteo/)
   raggi, please open new threads in the future, as this helps us track issues accurately
   🙂
 * > I have a similar issue whereby I can create the custom sort filters I want (
   > Name:A-Z and Availability) but can’t seem to combine them so they display alphabetically
   > and at the same time ‘move’ out of stock to the last items in the list. Is 
   > this possible?
 * This is not possible without writing up your own custom queries for shop sorting(
   we’re limited in our plugin by what WooCommerce gives us in the filters we use),
   and is not very simple to do.
 * If you sort by name A-Z, then name is used FIRST. Availability would only then
   be used as a tie breaker. Example: I have 2 products named “Woo Logo”. In your
   scenario, they’re displayed together, and the one in-stock would be shown before
   out of stock. The out of stock one isn’t moved to the end of any list, because
   the sorting is by name with an availability tie breaker.
 * To exclude out of stock products initially, then add them after showing other
   product alphabetically, would require the help of a developer with good knowledge
   of WP_Query. You’d have to query products by name with no stock, then products
   with no stock by name, then merge these into your display list.
 *  [isasimo](https://wordpress.org/support/users/isasimo/)
 * (@isasimo)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/sorting-by-availability/#post-6648578)
 * Hey [@dogmatix72](https://wordpress.org/support/users/dogmatix72/),
    how did 
   you manage to show the out of stock products at the end? I see you could did 
   it without the name sorting.
 * This is how it sorts by availability (but actually by name):
    [http://elscampaners.cat/categoria-producte/fruites/?orderby=by_stock](http://elscampaners.cat/categoria-producte/fruites/?orderby=by_stock)
 * This is how I want it sorts (by category) but the out of the stock at the end:
   
   [http://elscampaners.cat/categoria-producte/fruites/](http://elscampaners.cat/categoria-producte/fruites/)
 * Any idea?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Sorting by availability’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-extra-product-sorting-options/assets/icon-256x256.
   png?rev=3303778)
 * [Extra Product Sorting Options for WooCommerce](https://wordpress.org/plugins/woocommerce-extra-product-sorting-options/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-extra-product-sorting-options/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-extra-product-sorting-options/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-extra-product-sorting-options/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-extra-product-sorting-options/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-extra-product-sorting-options/reviews/)

## Tags

 * [sorting](https://wordpress.org/support/topic-tag/sorting/)

 * 6 replies
 * 6 participants
 * Last reply from: [isasimo](https://wordpress.org/support/users/isasimo/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/sorting-by-availability/#post-6648578)
 * Status: resolved