I am trying to display parametric search results only when there is an actual parametric value.
I created a new parametric search view and placed the search button and the results view on separate pages so that I don't get an initial set of results on the search page. However, if I do not enter a search value and simply click 'Submit', i'm taken to the page with the results view with no URL parameter value to filter the results. Therefore all results are displayed.
I expected the results view to return no results since there was no value in the filtering parameter. Or, at least have the ability to set a default filter value that I could set to something that would never return a result.
Unfortunately, it is not on our Roadmap to change the functionality of the Parametric search.
Parametric Search is restrictive, which means that it filters out posts not matching the search criteria.
If there is no search criteria, there is nothing to filter out.
Please note that this code worked because this specific client had one one URL parameter
If you have this same scenario, it would be useful to use that code.
If this is not the case, you would need to check any URL parameter related to the parametric search.
Unfortunately, as stated above this is not a feature of the Views Plugin, and it is not planned to implement this in future releases.
It means, the solution would always stay a "Custom Solution", which requires modifying the Plugin's files after each update.
I can unfortunately also be of restricted assistance only when it comes to custom coding or modifications in our Plugins Code.
Please let me know if you have further questions regarding the issue mentioned in this Thread
and let me know if the above solution works for you, I look forward to your reply!