- This topic has 0 replies, 1 voice, and was last updated 10 years, 10 months ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Different default view (no search term) possible?
Hi,
I am not sure if this would be better suited in the Feature Requests forum or if it’s actually possible already. I couldn’t find any clues in the documentation.
Is it possible to have different views depending on if the user has entered a search term or not?
For example: The default view shows a list of posts grouped by category or basically any other content I choose. Once the user enters a search term the page will display the results according to the results.php.
In standard wordpress we can achieve this with a conditional is_search() in php. Is there any way to include such a switch in the results.php or is it not possible due to the way the Ajax request works?
Is there a specific javascript event which gets fired to indicate whether the user has entered a search query or if it’s empty? (in that case we could at least hide the content with js if a search is performed).
Thanks,
Robin