Hi.
To get better search results, we first want to display posts of the "BASICS"-category, and beneath that, seamlessly, posts OUTSIDE that category. (We move the results of the first search into the second search results by JQUERY.)
It works when loading the page, but there are 2 problems:
1. When changing the search criteria, we need to trigger that first search again. How do that? How trigger a search?
2. And then, as infinite scrolling happens, the first bunch of search results of the second search disappear. How prevent that?
THANK YOU 🙂
Hello,
Are you using AJAX search forms for both post views?
If it is, there isn't such kind of built-in feature with AJAX search form, you might consider to disable AJAX search feature, submit the search form with a submit button, and pass the same URL parameter to both search forms, and test again
Yes, it should work with AJAX.
How about:
1. Hide the search form of the BASICS search somewhere on the page
2. Transfer the clicks from the nonBASIC search form to BASICS search form through jquery
(Maybe it would be better then not to merge the search results, but to have them one after the other?)
As I mentioned above: there isn't such kind of built-in feature with AJAX search form.
According to our support policy, we don't provide custom codes support:
https://toolset.com/toolset-support-policy/
You can also check it with our Toolset contractors:
https://toolset.com/contractors/
And you might consider the workaround I mentioned above:
disable AJAX search feature, submit the search form with a submit button, and pass the same URL parameter to both search forms
So you don´t see at first glance, why my solution should not work?
So I´ll just try it... 🙂
Hi,
Luo is on vacation this week, so I'll be following up on this ticket.
You're welcome to try your planned solution of using two separate search forms and keeping them in sync using a custom script.
In case, you need any assistance around Toolset's search hook and events, feel free to let me know, along with the link to the example page.
regards,
Waqar