So the logic behing this is : Give me the list of all posts having the first option checked for the custom field services-pour-groupes. But the wpv-view is still showing all results instead of filtering the results with the parameter that I have specified.
What should I change to the wpv-view shortcode to get the results that I want?
printscreen3: In the result, we should only see Le Repère Vibratoire with the actual filter.
When I use my search page to query all post where "atelier" is checked for the custom field "services-pour-groupes", I'm getting this in my URL : ?wpv-wpcf-services-pour-groupes[]=Ateliers+%2F+Formations
How can I put this in my wpv-view shortcode so the view only show posts where services-pour-groupes has "ateliers" checked?
I also try this : [wpv-view name="liste-de-partenaires" services-pour-groupes="ateliers"]
Where : liste-de-partenaire is the view
Where : services-pour-groupes is the custom field
Where : ateliers is one of the checkbox choices value
Result : The filtering doesn't work. All posts are showed instead of showing only those with "ateliers" checked from the services-pour-groupes custom field.
There is a complication with filtering by checkboxes custom fields because of the way they are stored.
It will only work if in the settings for the checkboxes custom field the options save different values to the database (rather than just each option saving '1' when checked, for example). Those values are the values that need to match in your query filter.
Thanks for your answer! So actually, I didn't know that I had to setup a filter in the admin section (see attached) while using only a shortcode. I thought that by giving the name of the custom field would do the job. So I have to add something like 20 filters to cover all my custom fields that I have and that should do the trick. Just a little bit of work but I won't complain if it's working 🙂