Skip Navigation

[Resolved] Checkboxes custom fields don’t appear in custom search filters

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to use my checkboxes group field as filters in a custom search, but the field does not appear in the popup where I select a field for creating custom search filters.

Solution: In the custom field settings for this checkboxes group, be sure "Save 0 to the database" is not checked. This option does not work with custom search Views. If you had this option checked previously and wish to change it, you must resave any posts where no checkboxes were checked. Otherwise, you may receive false positives in search results.

Relevant Documentation:
https://toolset.com/errata/checkboxes-that-save-0-are-interpreted-as-checked-by-views/
https://toolset.com/documentation/customizing-sites-using-php/functions/#checkboxes

This support ticket is created 4 years, 8 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 5 replies, has 3 voices.

Last updated by David Gimenez 4 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1568177
Captura de pantalla 2020-03-30 a las 15.53.11.png
Captura de pantalla 2020-03-30 a las 15.52.28.png

Hi there.

I have a checkboxes group (I attach and screenshot), and I want to insert them in a filter of custom search. That checkboxes group are missing in filters.

Is it possible to use that type of field like as filter?

Thank U!

#1568361

Hello, yes you should be able to use checkboxes fields as filters in a custom search. Have you saved any posts with some checkboxes checked? If so, the fields should appear in the custom filters area. Sometimes you must refresh the page for the filters to appear. If they still do not appear, I will be glad to take a closer look.

#1568431

Hi Christian. First of all... thanks for your help.

Have you saved any posts with some checkboxes checked? -> Yes

The fields are missing. If you want to check... open a private post to answer and I give you credentials.

Thanks again

#1568485

Please provide login credentials in the private reply fields here.

#1569749

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

Thank you for getting in touch. Christian is unavailable today but will be back tomorrow to continue working through this with your. However this issues seems similar to the one in the link below.
https://toolset.com/errata/checkboxes-that-save-0-are-interpreted-as-checked-by-views/

Please try this and let me know if the issue still remains.

Thanks,
Shane

#1569805

Hi Shane.

Thank you for your help. The problem is solved with your help. If I don't save 0 the filter works right.

My issue is resolved now.

Thanks again for your help and your time.