We have a site that searches custom post types by a couple different parameters. The search used to be button driven. The user would set their options click search and get the results. We updated the page to use the AJAX search capability. Now, when a user changes any one of the filter values, the search results update. However, the filters do not update to reflect the valid options for the search results.
For example, there are two drop downs: Resource Type and Keywords. When you change either, the search results update; however, the options in the filters stay the same including their resource counts.
To demo this, go to hidden link and click on the one of the blue resource type icons half way down the page (Funding, Projects & Reports, etc.). This takes you to the search page filtered for the type. As you change the various drop downs on the left side, none of the options in the other filters change. They are all based on the original search.
Is it possible to have the Ajax results update the filter options as well? This would match what happens when you have a search driven by a search button. Thanks,
Joe
That should be possible, yes, if you head to the View you created, in the "Custom Search Settings", you should select "Let me choose individual settings manually".
Then, set the settings as I did in the ScreenShot attached.
That will make it so that the results update on change of the inputs, and the inputs as well update when results update.
I chose "Update URLs after loading search results", but that one is up to what you prefer.
Important for your goal is "Show only available options for each input".
That does produce the exact search input behaviour you are looking for, right?