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.
Tell us what you are trying to do?
I am implementing a search filter. I have a custom field type of checkbox. Now by default the logic between the checkboxes is OR. But I need And logic between the checkboxes. Kindly help me.
Is there any documentation that you are following?
No
This function will look for the custom field filter used for the field "wpcf-property-checkboxes" in all the views. And, if found, will change its operator to 'AND' from 'TO'.
( you'll change the 'property-checkboxes' with the slug of the field used on your website )
I hope this helps and please let me know if you need further assistance.
Yes, to limit that function to filter only specific view(s), you can change the conditional check at line # 4, from:
if ( !is_admin() ) {
To:
// list of target view IDs
$target_views = array(123, 456, 789);
// if the current view is among the target views
if ( !is_admin() && ( in_array($view_settings['view_id'], $target_views) ) ) {
As a result, the function will only apply this change in the operator to a view, if its ID is available in the list/array '$target_views'.
(you'll change the IDs 123, 456, 789, etc with the actual IDs of your views that you'd like to target for this snippet)
Note: You can see the IDs of your website's views from WP Admin -> Toolset -> Views. And if you don't see this section to manage views, please go to WP Admin > Toolset > Settings > General and select the option "Show both the legacy and Blocks interface and let me choose which to use for each item I build" for the editing experience.