Hello,
I have a radio custom field that could take 5 different values (Ateliers, Sorties, Conferences, Langues, Informatique)
I'm now building a Views that will be filtered by this custom field. But the result of the Views should display different values of the filter custom field (ie : Ateliers, Sorties, Conferences).
Is it possible to have this kind of working and how to format the Views shortcode :
[wpv-view name="backoffice-select-enseignement" recherche="Ateliers, Sorties, Conferences"]
or by defining directly the filter inside the Views?
Regards
Pat
You have to use the option "in" instead of "equal to" in the Query Filter. See the attachment here.
Then you can use either a shortcode attribute to specify the values, or you can predefine them in the Query Filter.
Hi Christian,
Many thanks, that' working fine.
Just an additional question : this works if I use the fixed filter in the admin section. Is there a way to make it work thanks to a shortcode attribute like [wpv-view name="backoffice-select-enseignement" recherche="Ateliers, Sorties, Conferences"] and if yes, what is the structure of the needed parameters?
Regards
Pat
Yes, you can make it work with a shortcode attribute. The format depends on your checkboxes values. It is best if your checkboxes each have a unique value. For example, if your checkbox values are 1, 2, 3, 4, and 5 and you want the filter to show 1,2 and 4, then you can supply the desired values in the shortcode attribute like this:
[wpv-view name="backoffice-select-enseignement" recherche="1,2,4"]
The values for each checkbox can be found in the field editor. See the attachment here.
Hi Christian,
Even if it is not working totally the same way than the one I was searching for (ie : shortcode parameter), I think I can manage that with your solution.
Many thanks
Pat