On this page
What this issue is
Sort order is the control that lets shoppers reorder a list of products or search results, for example by price low to high, newest, or best selling. It is broken when choosing an option changes nothing, reloads the page with the same order, shows an error, or returns an order that does not match the label.
Common forms: price sorted as text (so 100 comes before 20), a dropdown that does not respond on mobile, a sort that is lost when a filter is applied, and a cached page that ignores the sort parameter such as ?orderby=price or ?sort_by=price-ascending.
Why it costs you leads or sales
Shoppers with a budget or a need for something new use sorting to narrow a long list quickly. If it fails, some will scroll through everything, and others will leave. The impact is usually low compared with a broken checkout, but it hits people who were already browsing with intent, and it makes the shop look neglected.
- Collection pageShopper lands on a long list
- Sort by priceDropdown does nothing or sorts wrongly
- Product pageRight product never found
- CheckoutSale not made
The shopper cannot get from a long list to the product they want.
Example: illustrative numbers only. Visitors who use sort and reach a product page, with working versus broken sorting.
How to check if your site has it
Test every sort option, not only the default. Do it on a desktop browser and on a real phone, because many themes use a different control on mobile.
- Open a collection or category page with at least 20 products.
- Pick each option: price low to high, price high to low, newest, best selling, A to Z.
- Check the first five and last five products really match the label.
- Confirm the URL changes (for example
?sort_by=price-ascendingor?orderby=price). - Apply a filter, then sort. Check the filter stays on.
- Sort, then go to page 2. Check the order carries over.
- Repeat on the site search results page.
- Open browser developer tools (F12), Console tab, and look for red errors when you change the sort.
How to fix it
Check the Console for JavaScript errors
If an error appears when you change the sort, a script is failing. Disable recently added apps or plugins one at a time to find the one responsible.
Check the URL
After choosing a sort, the address should include a sort parameter. If it does not change, the dropdown is not firing. If it is there but the order is the same, the server or cache is ignoring it.
Clear and configure caching
Purge page, CDN and plugin caches. Make sure your cache treats query strings as different pages.
Check the data
Products with empty prices, prices stored as text, or no sales history will sort oddly. Fix the underlying fields.
Apply the platform fix
Use the tabs below for your platform.
Check the default sort setting
In WooCommerce, go to Appearance > Customize > WooCommerce > Product Catalog and check the Default product sorting option.
Exclude sort parameters from cache issues
In your caching plugin, make sure URLs with
orderbyare cached separately or excluded, then purge the cache.Test for plugin or theme conflicts
Switch to a default theme on a staging copy and deactivate plugins one by one. Popular filter or product-grid plugins are common causes.
Check price meta
Open a product and confirm Regular price is a plain number with no currency symbol or text.
Check the collection sort setting
In Admin, go to Products > Collections, open the collection and check Sort. Choose Manually only if you want a fixed order.
Check the theme
In Online Store > Themes, preview a default theme such as Dawn. If sorting works there, the problem is in your theme code or an app.
Review search and filter apps
Disable third-party filter or search apps temporarily, since they often replace the native sort.
Check that sort_by is preserved
In theme code, make sure filter links keep the
sort_byparameter, otherwise applying a filter resets the sort.
Check the Collection List sort
Select the Collection List in the Designer, open Settings and review Sort Order. Webflow native lists only offer the sort you set there.
Check custom sort controls
If you use Finsweet or custom scripts for visitor sorting, confirm the script loads and that attribute names match the elements.
Check field types
Use a Number field for price, not Plain text, otherwise values sort alphabetically.
Check the sort option on the product page
In the editor, select the Product Gallery, open Settings and check that Sort is enabled and the options you want are ticked.
Check product data
In Store Products, confirm every product has a price and is visible.
Publish and retest
Editor changes only apply to the live site after you publish.
Sort numbers as numbers
Make sure the database column or JavaScript compares numeric values, not strings.
Whitelist sort values on the server
Map each allowed sort key to a safe ORDER BY clause and fall back to a default for unknown values.
Keep parameters in links
Pagination and filter links must carry the current sort parameter.
// Wrong: sorts as text, so "100" comes before "20"
products.sort((a, b) => a.price > b.price ? 1 : -1);
// Right: compare numbers
products.sort((a, b) => Number(a.price) - Number(b.price));Broken
- Order reads 100, 20, 35, 9
- Filter click resets the sort
- Dropdown does nothing on mobile
Fixed
- Order reads 9, 20, 35, 100
- Sort stays after filtering and paging
- Dropdown works on phone and desktop
How to confirm it's fixed
Repeat the manual test on a phone and a desktop browser in a private window, after purging caches. Check each sort option, then combine sort with a filter and with page 2. The Console should show no new errors.
How to prevent it happening again
- Retest sort after every theme update, app install or plugin update.
- Test on a staging copy before pushing changes to the live shop.
- Store prices in numeric fields only.
- Purge caches after changing catalogue settings.
- Add sorting to your release checklist for collection and search pages.
How FunnelGuard handles this
FunnelGuard does not check sort order today. It is a possible future check, so for now you need to watch for it yourself. What FunnelGuard does cover nearby is the journeys that follow browsing: it runs your real lead forms, checkouts and booking or chat buttons on a schedule from the EU or the US, checks each step and the tracking hits sent to platforms such as GA4, Google Ads and Meta, and sends one alert with a screenshot after a second-region recheck. That will tell you if a page error blocks the path, but not whether the sort order is correct.
To watch for broken sorting, add the manual test above to your monthly routine and after every release, and watch for support messages or session recordings in your analytics tool showing people clicking the sort control repeatedly. You can start with the free FunnelGuard plan (1 site, 2 journeys, daily checks, no card) to cover your main conversion paths, or request the free read-only website audit.
Questions people ask
Why is my sort by price not working?
The most common causes are a JavaScript error, a plugin or app that replaces the native sort, a cached page that ignores the sort parameter, or prices stored as text. Open the browser Console, change the sort, and look for errors. Then check that the URL changes and that your cache treats query strings separately.
Why does my sort reset when I apply a filter?
The filter links are probably built without the current sort parameter, so the page reloads with the default order. Update the theme or plugin so filter, sort and pagination links all carry the same query string.
Why are my prices sorted as 100, 20, 35?
That is text sorting, where values are compared character by character. Store price in a number field, or convert to a number in your code before sorting, for example with Number(a.price) - Number(b.price).
How do I fix sort by not working in WooCommerce?
Purge your cache, check Appearance > Customize > WooCommerce > Product Catalog for the default sorting, and test with a default theme and plugins disabled on a staging site. Conflicts with filter or grid plugins are a frequent cause.
Why does sorting work on desktop but not on mobile?
Many themes use a different control or script on small screens, and it may fail to load or be covered by another element. Test on a real phone, and check the Console using your browser's mobile emulation.
Can a broken sort order hurt my sales?
Yes, though the impact is usually lower than a broken checkout. Shoppers who sort by price or newest are narrowing a long list, and if it fails some will leave without finding a product.
Does FunnelGuard detect a broken sort order?
No. FunnelGuard does not check sort order yet, and it is a possible future check. It does monitor your lead forms, checkouts, booking and chat buttons and the tracking they send, so use a manual test for sorting.
Related issues
- CNV-326Filters return nothing or wrong productsFix guide
- CNV-328Pagination/infinite scroll stops loadingFix guide
- CNV-323Site search returns no results for obvious termsFix guide
- CNV-325Search results link to dead productsFix guide
- CNV-329Search autocomplete brokenFix guide
- CNV-324Search box submits to 404Fix guide