[Résolu] Custom field filter for checkboxes type field
This support ticket is created Il y a 3 années et 6 mois. 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
During testing on my website, I was able to make this filtering work, by using the raw value (i.e. the value saved in the "Value to store" field), as the passed attribute value for each checkbox option.
The attached screenshot shows the query filter settings and the shortcode for the view will look like this:
[wpv-view name="view-slug" type="abc"]
Note: You'll replace "view-slug" with the view's slug and "abc" with the target raw checkbox value to filter by.
I tried this and it can only filter by the first checkbox option.
When I tried putting in the second, third, etc checkbox option, it shows no results.
For example,
[wpv-view name="view-slug" type="abc"] - This shows a result.
[wpv-view name="view-slug" type="def"] - This doesn't a result.
[wpv-view name="view-slug" type="xyz"] - This doesn't a result.