That did the trick. Thank you!
There going to be over 5000 posts. so the query solution won’t be very good solution.
Well you gave me an idea for transforming it to a taxonomy field. I will try that. And see if that works.
Thanks for the help!
Thanks for replying. With this I get all posts with a option selected. But I am looking for a way to make a list of the selected options of a checkbox field.
checkbox field has the options: red, blue and green
post1 has red and post2 has green
And then I get a list with the options red and green
Something like :
$terms = get_terms( array( 'taxonomy' => 'category', 'hide_empty' => true, ) );
But than for a checkbox field.