• Resolved mybeadsaustralia

    (@mybeadsaustralia)


    Hi!

    When I search for a product, and sort by ‘date’ or ‘price’ etc, the ‘sort by’ function does not work. When the page refreshes, the original (sorted by relevance) results remain.
    The ‘sort by’ function does work on the product categories however.
    I think this started happening when I did a theme update, but I am not sure?

    Thank-you!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mikko Saari

    (@msaari)

    If changing the orderby parameter does nothing, that suggest something overrides it. Do you have any custom code on the site that would adjust the orderby parameter? Any plugins that deal with post ordering?

    Thread Starter mybeadsaustralia

    (@mybeadsaustralia)

    Thank-you for your reply.

    I believe it is the theme, as I have not added any other custom code or plugins (the sorting worked previously, and the theme has had a couple of updates).

    I contacted the theme designer and they said “both are using same function to filter and sort products. So it can not work together.” If anything it seems like the setting in Relevanssi to sort by relevance overrides the sorting function of the theme. Is there a way around this? Thanks

    Plugin Author Mikko Saari

    (@msaari)

    What does that mean? Relevanssi doesn’t “use a function to sort products”; Relevanssi reads the standard WordPress orderby parameter and uses that to sort the results.

    The popularity and price sorting don’t work automatically in Relevanssi, but since you said it worked before, I assumed you already use this to enable the price and popularity sorting in Relevanssi: https://www.relevanssi.com/knowledge-base/woocommerce-popularity-and-price-sorting/. If you don’t, add that function now.

    Thread Starter mybeadsaustralia

    (@mybeadsaustralia)

    Thank-you!

    Adding that into functions.php fixed the issue. When my theme was updated (to a pretty much different version) the original functions.php was re-written to work with the new theme. I think that code was left out.

    Thanks again!

    Plugin Author Mikko Saari

    (@msaari)

    If you have a theme that gets updates, it’s useful to use a child theme or put your theme-independent code in a custom plugin to avoid getting overrun by a theme update.

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

The topic ‘Search sorting stopped working’ is closed to new replies.