Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Sort order broken on product or search pages: how to fix it

CNV-327Low impactCould addBy FunnelGuardPublished Updated
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.

Where a broken sort hurts the journey
  1. Collection pageShopper lands on a long list
  2. Sort by priceDropdown does nothing or sorts wrongly
  3. Product pageRight product never found
  4. CheckoutSale not made

The shopper cannot get from a long list to the product they want.

Shoppers who reach a product pageExample numbers
Shoppers who reach a product page (example)Sort works: 60 %; Sort broken: 42 %023466042Sort worksSort broken%

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.

Manual sort test
  • 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-ascending or ?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

Find and fix the cause
  1. 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.

  2. 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.

  3. Clear and configure caching

    Purge page, CDN and plugin caches. Make sure your cache treats query strings as different pages.

  4. Check the data

    Products with empty prices, prices stored as text, or no sales history will sort oddly. Fix the underlying fields.

  5. Apply the platform fix

    Use the tabs below for your platform.

Fix by platform
  1. Check the default sort setting

    In WooCommerce, go to Appearance > Customize > WooCommerce > Product Catalog and check the Default product sorting option.

  2. Exclude sort parameters from cache issues

    In your caching plugin, make sure URLs with orderby are cached separately or excluded, then purge the cache.

  3. 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.

  4. Check price meta

    Open a product and confirm Regular price is a plain number with no currency symbol or text.

Numeric sort for price (not text sort)javascript
// 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));
Price low to high

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

Habits that keep sorting working
  • 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.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.