limit search results Posted by Serio Being 28 Feb 2020 13:02 UTC Is there a way to limit the search results to only a specific category. So I have this search module, and when any user searchs on it only the pages... belonging to a certain category to be shown... Thank you!
Posted by Serio Being 03 Mar 2020 17:11 UTC Serio Being wrote: Is there a way to limit the search results to only a specific category. So I have this search module, and when any user searchs on it only the pages... belonging to a certain category to be shown... Thank you! I understand that this can be done with the use of the custom search plugin, but I have a problem: The search is all good configured, but the results are shown on the same page. How can I make it so that when I submit the search, I will be redirected to another page with the results?
Posted by Jonny Bradley 03 Mar 2020 17:45 UTC Serio Being wrote: ...How can I make it so that when I submit the search, I will be redirected to another page with the results? Interesting idea, but i don't think there's any way of doing that at the moment, you can only direct the results to a div of your choice on the same page. You could make the search form hide when the results arrive with a bit of javascript, which might look a bit similar. Something like this maybe (untested)? Copy to clipboard$(document).on("pageSearchReady", function() { $('#customsearch_0').hide(); });
Posted by Serio Being 04 Mar 2020 16:11 UTC Jonny Bradley wrote: Interesting idea, but i don't think there's any way of doing that at the moment, you can only direct the results to a div of your choice on the same page. You could make the search form hide when the results arrive with a bit of javascript, which might look a bit similar. Something like this maybe (untested)? Copy to clipboard$(document).on("pageSearchReady", function() { $('#customsearch_0').hide(); }); I understand but that doesn't quite help in what I am trying to archieve... is there any other way how I can limit the search to only wiki pages, or only blog posts? Becuase right now it shows all and I want to limit it to only my preferred type of object...