Skip to content
Website design companyWebsite design company
Artofdata Website Designers
  • Web
    • Website Design
      • Portfolio
      • Win new clients with brochure website design
      • Estate Agent Website Designers
      • Elementor Pro
      • WooCommerce
    • Ecommerce
      • Retail clothing websites
    • Graphic Design Reading
    • WordPress Plugin Developers
      • Sequential Invoice Numbers Plugin
  • Marketing
    • SEO Content Writing
    • Social Media
  • Internet
    • Domain Names
    • Hosting
    • Fast Woocommerce Hosting
    • Fast Websites – Greener Hosting
  • Pricing
  • Etc.
    • About
    • News
    • Website Design Questionnaire
  • Contact
  • 0118 942 0101
  • Web
    • Website Design
      • Portfolio
      • Win new clients with brochure website design
      • Estate Agent Website Designers
      • Elementor Pro
      • WooCommerce
    • Ecommerce
      • Retail clothing websites
    • Graphic Design Reading
    • WordPress Plugin Developers
      • Sequential Invoice Numbers Plugin
  • Marketing
    • SEO Content Writing
    • Social Media
  • Internet
    • Domain Names
    • Hosting
    • Fast Woocommerce Hosting
    • Fast Websites – Greener Hosting
  • Pricing
  • Etc.
    • About
    • News
    • Website Design Questionnaire
  • Contact
  • 0118 942 0101
Website design companyWebsite design company
Artofdata Website Designers
  • Web
    • Website Design
      • Portfolio
      • Win new clients with brochure website design
      • Estate Agent Website Designers
      • Elementor Pro
      • WooCommerce
    • Ecommerce
      • Retail clothing websites
    • Graphic Design Reading
    • WordPress Plugin Developers
      • Sequential Invoice Numbers Plugin
  • Marketing
    • SEO Content Writing
    • Social Media
  • Internet
    • Domain Names
    • Hosting
    • Fast Woocommerce Hosting
    • Fast Websites – Greener Hosting
  • Pricing
  • Etc.
    • About
    • News
    • Website Design Questionnaire
  • Contact
  • 0118 942 0101
  • Web
    • Website Design
      • Portfolio
      • Win new clients with brochure website design
      • Estate Agent Website Designers
      • Elementor Pro
      • WooCommerce
    • Ecommerce
      • Retail clothing websites
    • Graphic Design Reading
    • WordPress Plugin Developers
      • Sequential Invoice Numbers Plugin
  • Marketing
    • SEO Content Writing
    • Social Media
  • Internet
    • Domain Names
    • Hosting
    • Fast Woocommerce Hosting
    • Fast Websites – Greener Hosting
  • Pricing
  • Etc.
    • About
    • News
    • Website Design Questionnaire
  • Contact
  • 0118 942 0101
  • Request a call back

WooCommerce Elementor order by stock quantity

There is no product stock high/low sort by widget in Elementor Pro?

Woocommerce Elementor sort order by stock quantity

Using WooCommerce Elementor order products by stock quantity. Also, help with general sorting problems. We also need to sort order stock. Our clients, clients often need large quantities of products for their projects.

If a client can’t afford a bespoke shopping website, we recommend WooCommerce for WordPress. This is compatible with Elementor Pro and Rank Math.

There is no sort-by widget in Elementor Pro.

woocommerce elementor sort order by stock quantity

We need to sort our products! Our customers need to be able to see the most expensive or cheapest products. Here is what we did to solve the problem.

In your child theme’s functions.php, add.

If you don’t have a child theme, read this https://elementor.com/blog/wordpress-child-theme/

// Creating Shortcode for Product Sorting
add_shortcode('wc_sorting','woocommerce_catalog_ordering');

Drag the Shortcode widget onto the Elementor Pro page builder and type [wc_sorting]
The sort by drop-down will appear to your customers.

Remove the Reviews from the dropdown

We have not enabled reviews on our products, so there are no reviews to be sorted by.
WooCommerce Elementor sort order by stock quantity

// Edit WooCommerce dropdown menu item of shop page//
// Options: menu_order, popularity, rating, date, price, price-desc
 
function my_woocommerce_catalog_orderby( $orderby ) {
    unset($orderby["rating"]);
    return $orderby;
}
add_filter( "woocommerce_catalog_orderby", "my_woocommerce_catalog_orderby", 20 );

Woocommerce Sort Order by Stock Values

Some clients need large volumes of our products. Endless scrolling is not helping the customer experience.

Alphabetically sort numerical values Why? 100 before 2

We did install some of the popular sorting plugins but for some reason, they sorted stock alphabetically. 1,100,2,300 This doesn’t help our customers at all.

https://stackoverflow.com/questions/62353002/add-sorting-by-stock-quantity-in-woocommerce-products-sort-by

// Ordering products based on the stock quantity values
function filter_woocommerce_get_catalog_ordering_args( $args, $orderby, $order ) {    
    switch( $orderby ) {
        case 'availability':
            $args['orderby']  = 'meta_value_num';
            $args['order']    = 'DESC';
            $args['meta_key'] = '_stock';
            break;
    }

    return $args;
}
add_filter( 'woocommerce_get_catalog_ordering_args', 'filter_woocommerce_get_catalog_ordering_args', 10, 3 );

// Orderby setting
function filter_orderby( $orderby ) {
    $orderby['availability'] = __( 'Availability', 'woocommerce' );
    return $orderby;
}
add_filter( 'woocommerce_default_catalog_orderby_options', 'filter_orderby', 10, 1 );
add_filter( 'woocommerce_catalog_orderby', 'filter_orderby', 10, 1 );

WooCommerce Order By Price Not Working Correctly

WooCommerce – Sorting problem sorted

When we first added the changes above, we were so happy! Then we realised the results were not in the correct order “What a pain!”. Don’t worry, there is a solution…

WooCommerce > Status > Tools > Product lookup tables – Click Regenerate

woocommerce sorting error

https://stackoverflow.com/questions/47056744/woocommerce-order-by-price-not-working-correctly

More help with WooCommerce sorting options

Woocommerce sorting options are pretty well hidden.
Appearance > Customize > WooCommerce > Product Catalogue
 
help-with-woocommerce-sorting
 
I hope this post saves you a lot of time. Please share it. Please also comment and suggest improvements.
 
Here is a working example of woocommerce elementor sort order by stock quantity on the Used Herman Miller Chairs  of product qty sort by on the category page of officechairman.co.uk
 
Sort by stock for woocommerce
  • 1.2 Ecommerce
  • December 5, 2022
  • 12:14 pm
PrevPrevious
NextNext

Vectorization

March 30, 2026

Free Website Design

May 19, 2025

Websites for Tradesmen

October 25, 2024

Website Internal Link Building Explained

July 17, 2024

The Darkside of Eco Website Design

January 17, 2024

News Categories

1.0 Website Design

1.1 Brochure Websites

1.2 Ecommerce

1.3 Wordpress

2.0 SEO

2.1 Logo

2.2 Content Creation

3.0 Locations

3.1 Reading

PrevPreviousSaving the environment with used office chairs (Oct 22)
NextWebsite Design Woodley ReadingNext
vectorization
free-websites

Free Website Design

websites for tradesmen

Websites for Tradesmen

SEO Internal link building explained

Website Internal Link Building Explained

eco-website-designers

The Darkside of Eco Website Design

websites-for-gardeners

Website Design Woodley Reading

Sort by stock for woocommerce

WooCommerce Elementor order by stock quantity

website-for-the-office-chair-man

Saving the environment with used office chairs (Oct 22)

website-for-revalyu

Revalyu Website Launch

get-variation-meta-woocommerce

Woocommerce get variation meta data PHP

website for law firms

Responsive brochure style website. SEO by Artofdata

How to SEO your logo

Logo SEO Search Engine Optimisation

E-Commerce-websites

Retail eCommerce Websites Reading

Website designers Reading News

Professionally written website content

Digital Marketing Agency Reading

Website Design Agency

website-for-clothing-companies

Migration to Woocommerce

custom-website-for-retailers

The Pangbourne Cheese Shop

signalR-website-development

SignalR Development

what-are-citations

SEO: What is Citation and Trust Flow?

SERPs-rankings-explained

What determines your position in the Search Engine Results Pages (SERP)

Budget websites Reading Berkshire

Budget websites Reading Berkshire

websites-for-accountants

Websites for Accountants

websites for law firms

New Site – E J Winter

Gutenberg-WordPress-editor

Gutenberg WordPress Editor

.co .uk domain names

Which domain name?

wordpress websitedesign

WordPress – What is it?

tails of tilehurst dog training web site

Tails of Tilehurst now live!

responsive website design

What’s a responsive site?

Get a free no obligation website design quote.

Click here

Tel: 01189 420101
Company Number: 6092965
Copyright Statement.

Website Design Bracknell | Website Design Wokingham |

Terms & Conditions | Privacy Policy

Artofdata.com Ltd
(Web Design Agency)
47 Brooksby Road,
Reading,
Berkshire,
RG31 6LZ

Facebook X-twitter Youtube Pinterest Instagram
Linkedin Reddit Youtube Map-marker-alt Rss
© 2026 ArtofData.com Ltd.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT