Accueil›Toolset Professional Support›[Résolu] Split: Creating checkbox filters to filter types – checkbox filter for single custom field to check empty fields
[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.
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.
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.
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.