Sauter la navigation

[Résolu] Split: Creating checkbox filters to filter types – checkbox filter for single custom field to check empty fields

This support ticket is created Il y a 5 années et 1 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Minesh Il y a 5 années et 1 mois.

Assisté par: Minesh.

Auteur
Publications
#1573115

2- I have a custom text field and I'd like to display the results based on whether there is content or not in it. I.e. the field is called "Note from the master" and is a text field and I'd like a checkbox that when check will search for only articles where that field is not empty.

#1573141

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

2- I have a custom text field and I'd like to display the results based on whether there is content or not in it. I.e. the field is called "Note from the master" and is a text field and I'd like a checkbox that when check will search for only articles where that field is not empty.
==>
Again, there is no direct way to add a checkbox filter for a single line custom field but there is a workaround.

Please check the following related ticket where I mention the steps.
=> https://toolset.com/forums/topic/complex-filter-requirement/#post-871171
=> https://toolset.com/forums/topic/if-types-field-checked-dont-show-post/#post-479071

Further, you need to use view's filter wpv_filter_query where you should adjust the query filter on fly to check your custom field has a value or not. n today. You need to adjust the query filters as per your requirement.

More info:
=> https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query