• Resolved jaydeesigns

    (@jaydeesigns)


    Hi people. I hope I can find some help here.
    I’ve set up a custom fields group with a multiple checkbox field. This field has 4 options and I would like to create a query that would display posts including one value from that array.

    For example:
    Post #1 has checkbox options A,B,C,D checked
    Post #2 has checkbox options A,B,C checked
    Post #3 has checkbox option A checked.

    I want to display only posts with option D checked. So in this case only Post #1 should show.

    Is this possible? how can I test posts to see if the value I want is in the array?
    Thank you!
    Jay

    https://wordpress.org/plugins/types/

Viewing 1 replies (of 1 total)
  • Thread Starter jaydeesigns

    (@jaydeesigns)

    Alright nevermind. I see checkboxes arrays are serialized and it would be quite tedious to get values from them. So in case anyone is trying to achieve something similar. It would be a better idea to create separate individual checkbox fields and create the query with true/false (0,1) values.

Viewing 1 replies (of 1 total)

The topic ‘Query posts with value from checkboxes array?’ is closed to new replies.