[Resolved] Filtering Posts on click, without filter options disappearing
This thread is resolved. Here is a description of the problem and solution.
Problem:
The issue here is that the user has their views parametric search, however once they select an option, their other filter values disappear
Solution:
I suspect that this is a case where you have this enabled in your custom search settings.
To disable this go to Custom Search Settings -> let me choose individual settings manually -> Which options to display in the form inputs then select "Always show all values for inputs" See Screenshot
If you are not seeing this section, scroll to the top of your view and click "Screen Options" in the top right hand corner and enable it.
This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Tell us what you are trying to do? I'm trying to work out how to create a filtering system similar to this site: hidden link
When you click on any of their buttons, it changes the items underneath, but the actual buttons stay there so you can change again easily.
I've worked out how to make checkboxes look like buttons, and for the buttons to be clickable to submit, but when ever you click one, the other options disappear...
Is there any documentation that you are following? LOTS of googling, reading over your documentation, support forum posts from the past etc
Is there a similar example that we can see? hidden link
I suspect that this is a case where you have this enabled in your custom search settings.
To disable this go to Custom Search Settings -> let me choose individual settings manually -> Which options to display in the form inputs then select "Always show all values for inputs" See Screenshot
If you are not seeing this section, scroll to the top of your view and click "Screen Options" in the top right hand corner and enable it.
Please let me know if this was able to resolve the issue for you.
I tested this but it seems that you have resolved the issue. However I suspect that your filters were using an AND logic to do the filters.
This means that only if you selected Mechanic and Graphic design from the filter, only posts that have Graphic Design and Mechanic selected will display.
I would suggest switching from an AND logic to an OR logic. This can be done by editing your query filter section. See Screenshot
I did put ClearFilter() in the "will run before getting the new results" in Javascript settings (first screenshot you shared), however when I go back into it, that's disappeared.
The Query Filter Section of views. It should be below the ordering section of you view. See Screenshot
Secondly the reason why your ClearFilter() function might not be working after the filter is that its quite possible that it's not added to the views callback but please try the solution with the query filter.
I see that you are doing it from the edit Layouts page. However to get access to the screen options settings you must go to Toolset -> Views and find the view that you are using in the Layout.