> For the complete documentation index, see [llms.txt](https://knowledgebase.ajaxsearchpro.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.ajaxsearchpro.com/miscellaneous/woocommerce/ordering-product-by-stock-status.md).

# Ordering product by stock status

### Displaying in stock products first

* On the **General Options -> Ordering** (step 1. & 2.) panel, select the **Custom Field Ascending** as the Primary ordering (step 3.).
* As the custom field name enter **\_*****stock\_status*** (step 4.)
* ..and the custom field type should be **string or date** (step 5.)

![](/files/gpkDIqDVextDrMjPjg6D)
