Hi @loreleyyy,
1. it is possible to do that with custom PHP code but it would not be easy to present multiple KBs in a single page.
That said the products.php template includes a foreach loop which can be replaced with this code to list all the KBs and all sections and all articles.: https://gist.github.com/BrElio/44f01db336fc1458cc144198a0245e41
The code is just a sample and would need to be expanded using WordPress functions to properly output the necessary elements but that should get you started.
I would suggest instead to add the Accordion menu to your Theme sidebar to access all the same content in an ordered way without having to customise any template.
2. that is not possible at the moment.
I hope this helps!
Hi!
Many thanks for your gist, this has really helped me with the first issue.
Hi @loreleyyy,
I might have a solution for your second request!
I have prepared another Gist for you: https://gist.github.com/BrElio/cda517040a898391cf9d324c71086dd2
At the top there is a small portion that should go to your functions.php
The rest of the code is a template to override the live results and make them open in a new window/tab
For that code to work you need to:
1. Create a file called live-search.php and place it inside the BasePress customization folder which you should have created following this article:
https://codesavory.com/knowledge-base/basepress/basepress-themes/customize-a-knowledge-base-theme/
In that file paste the code from the Gist.
That should be it!
Hi,
Thanks for the reply, the jquery solution is great!
I’m afraid I still need a bit of advice: we are using the Premium version of BasePress with the SearchWP integration with a custom knowledge_base engine and we would like for the search to automatically run through both the KBs we have:
1. The generic landing page where we have both KB’s listed together
2. And also on the individual KB page
At the moment I see the search form either picks up the first KB it finds on the generic landing page (e.g. data-product=’first_kb’), or the individual one on the single KB page. Is it easy to add a filter or something to tell the search form to search through both KBs?
Also, with the ajax live search, sometimes we get a bit of a flickering/jumping around of the results, not sure exactly why this is happening?…
Many thanks for the help1
Hi @loreleyyy,
being this request related to the Premium version please open a support ticket from within the plugins menu and we can help you from there.
If you could also share the links to the pages you refer to (in the new ticket) that would help.
Thanks
Just sent a ticket, thanks!