Hi. I would like my multiple select search filters to have a default entry of "Search All" selected. I know that searching all is the default functionality of the multiple select with no field selected, but that isn't obvious to users, so clicking on other options other than "Search All" to refine their search would be better user experience. Is there any way to implement this?
Thank you.
One thing to note - most of these filters will be for custom taxonomies. Thanks.
This is not possible.
Only a Dropdown or Radio Taxonomy filter can have an empty or a custom option to search "all" items.
What we could do is file a request to make it possible, but this needs to be evaluated first by Developers if they will implement this.
In custom fields, you can achieve the goal by passing "manually entered values" in the Filter of "multi-select" kind.
Empty values mean all values are returned in this case.
It does seem like if a filter for a custom field multi-select can do this, the filter for a taxonomy should be able to, too - from a user's point of view they won't know the difference, since the filters will otherwise appear the same. If you could ask the developers about it, I think it would be an improvement to the plugins.
On another site, I realized I'd solved this issue for custom fields with the filter paramatters: auto_fill_default="Any" auto_fill="wpcf-custom-field-title" auto_fill_sort="asc" - is this method possible with custom taxonomies?
Hello,
You can add default option to taxonomy select control, for example:
[wpv-control-post-taxonomy default_label="All" ...]
See our document:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-control-post-taxonomy
default_label (opt):
'default option text'
Add default option like All or Any on taxonomy select control.
That doesn't seem to work with multi-select taxonomy filters. You can see it on this page: hidden link - password 2Jcnb}4gu?N-fXN!
The first multi-select filter, Resource Type, uses this shortcode: [wpv-control-post-taxonomy taxonomy="resource-type" type="multi-select" url_param="wpv-resource-type" default_label="All"] As you can see, no "All" option is added. When I used the same code on the checkboxes filter, Copyright Status, above, default_label="All" worked just fine.
There is a misunderstanding, the attribute "default_label" works only for the single select dropdown menu, it does not work for the multi-select field, it needs a feature request, see the answer:
https://toolset.com/forums/topic/adding-a-default-entry-to-multiple-select-search-filters/#post-756570
For your new question:
auto_fill_default="Any" auto_fill="wpcf-custom-field-title" auto_fill_sort="asc" - is this method possible with custom taxonomies?
No, those attribute does not work in the shortcode [wpv-control-post-taxonomy], see our document:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-control-post-taxonomy
There isn't such kinds of options.
Ok, thanks. I do think that if custom field multi-selects can have default text, taxonomy multi-selects should too, since for a front-end user of the site they are indistinguishable. Will you file that as a feature request, or should I?
I will forward it to Beta, he manages the feature request of Views plugin, our developers will evaluate it, but there isn't any ETA to implement it, you can subscribe to our blog to get the updated news.
https://toolset.com/blog/
Thanks. It's not urgent, but I do think it would be a good feature to add.