Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search list priority
This topic contains 6 replies, has 2 voices, and was last updated by Gee Ranasinha 6 years, 8 months ago.
- AuthorPosts
- January 19, 2017 at 12:43 pm #11655
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 !)
January 25, 2017 at 4:56 pm #11716Hi,
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.pngThen 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 :)
January 25, 2017 at 5:31 pm #11718Thanks.
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.January 25, 2017 at 6:05 pm #11721Yes, 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 :)
January 25, 2017 at 6:28 pm #11722That 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.January 25, 2017 at 6:29 pm #11724You 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 :)
January 26, 2017 at 9:13 am #11729Perfect! Thank you.
- AuthorPosts
You must be logged in to reply to this topic.