Search list priority

This topic contains 6 replies, has 2 voices, and was last updated by Gee Ranasinha Gee Ranasinha 5 years, 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #11655
    Gee Ranasinha
    Gee Ranasinha
    Participant

    Hi Ernest,

    At the moment, dropdown filter parameters override freetext searches. Can that be changed?

    E.g. I have an entry called Alfajiri Villas, in Kenya. If I select the “Kenya” dropdown, the item appears – that’s great.

    However if I enter “Alfajiri” in the text search box (and have the dropdown filters set to another country) nothing appears. Also, if I enter “Alfajiri” (rather than “Alfajiri Villas”) in the text search I get a “no result did you mean Alfajiri Villas?”, but clicking on that text links doesn’t bring anything (if the “Country” dropdown isn’t set to the correct country).

    Can the behavior be changed so that – even if the wrong dropdown parameters are set – a free text search brings up results that the visitor can click on?

    (Hope the above makes sense !)

    #11716
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Sorry for the late response, some tickets got spammed, and I just noticed it on the dashboard.

    Well, the only possible solution I can see to this matter is to create 2 search instances:

    Search 1: A search bar only, without any filters. This is going to be used as a free search.
    Search 2: Filters only, this is the search you already have. All you need to do is disable the input on the Layout Options -> Search box layout panel: https://i.imgur.com/Ln9bE8t.png

    Then place the two shortcodes one after another and it’s done.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #11718
    Gee Ranasinha
    Gee Ranasinha
    Participant

    Thanks.

    However the problem with this solution is that it brings-up two search results windows.

    Attachments:
    You must be logged in to view attached files.
    #11721
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Yes, but maybe it could be possible to hide one results box when the other shows via the search API.

    If your search IDs are 3 and 1 then try putting the following custom code into the functions.php file in your active theme directory:

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #11722
    Gee Ranasinha
    Gee Ranasinha
    Participant

    That works – thanks.

    Doing a free text search, or selecting one of the dropdowns, shows only one search result window. However the default behavior (i.e. before the user has changed anything) still shows two windows.

    Attachments:
    You must be logged in to view attached files.
    #11724
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    You should disable the auto populate feature for one of the boxes on the Layout Options -> Search box layout panel.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #11729
    Gee Ranasinha
    Gee Ranasinha
    Participant

    Perfect! Thank you.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.