This support ticket is created hace 6 años, 10 meses. 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.
Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.
I am trying to: add Single line custom field filter using checkbox
Link to a page where the issue can be seen:enlace oculto click on filters
I expected to see: for example, if i click on "Amsterdam" then it will give perfect results, but when I click "Bussum" with "Amsterdam" selected it says no results found.It should give results from "Amsterdam" and "Bussum" as it is checkbox filter.
You have a single line text field, which you are displaying as checkboxes in the filter.
The resulting query uses and AND comparison when multiple values are checked, and in this case there is no option to change that.
To make this an OR comparison you would need to use the wpv_filter_query filter and hook into this View and manually override the relation argument of the meta_query to "OR".
If you don't want to add code to your site, make a field type that is a checkboxes field (or use a taxonomy which makes for more efficient queries when used as filters in any case) and then it will function as required.
To make this an OR comparison you would need to use the wpv_filter_query filter and hook into this View and manually override the relation argument of the meta_query to "OR".
Comment : Will it work for the view I have shown you? As it is single line field.
If you turn on debug mode for Views (Toolset > Settings > Front-end Content) and reload the page with two of the options selected you will see in the wpv_filter_query section the meta_query used by Views to retrieve the posts, and the relation will be set to AND.
I tried with meta_query "OR" relation using below code. But it was not working properly then I played with the filter settings itself and fount solution.