@ Stephen
yeah… that’s not going to work.
The checkboxgroup field type is saved as a JSON encoded array in the database. Basically this means unless none of the options were checked the field saved in a way that is not possible to use meta_query. When no options are checked, nothing is saved except an empty value for the meta key.
The meta query you’re using will not work because it is basically selecting all entries which have the field_id_membership-cat ID that does not equal the value of supervisor. So the result would be all entries where you selected any of the options in the checkbox group because all entries where you have selected more than one option will always not be equal to “superviser”.
To make this work…
First, you need to register each option in your current checkboxgroup as an individual checkbox. They can all be added to the same metabox. You would just add the four checkboxes to the same fields array.
The meta query could also be simpler … I think. Honestly, I use it so infrequent that it takes me few attempts to get it right. But I think this is what you would use.
`meta_query='{“meta_key”:”field_id-supervisor”,”meta_value”:”1″}’
The above meta query assumes a checkbox field with the field ID of field_id-supervisor and will display all entries with that checkbox selected.
Hope that helps!
ps. I do offer custom development if you find this not in your “wheelhouse”. If you are interested in this, please contact me using the Contact link at the very bottom of the page for a quote.
