Different default view (no search term) possible?

Forums › Forums › Search & Filter Pro › Different default view (no search term) possible?

Viewing 1 post (of 1 total)
  • Anonymous
    #20197

    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

Viewing 1 post (of 1 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.