Query_posts multiple dynamic checkboxes from custom post
-
Hi,
I have created a custom field that can have multiple checkboxes for products that are related to that post, that can be added dynamically using Javascript. At first I just saved the serialized array of checked checkboxes, but I also have to be able to query based on the checkboxes. I need to be able to do a query that returns all posts that have a specific checkbox checked.
So eventually I need to save the checkboxes separately in a meta_key for each checkbox.
So far I can manage, but how would I query the checkboxes without knowing exactly how many different meta_keys there are for the checkboxes?
I guess when saving the checkboxes they will be named something like: post_product_1, post_product_2, etc..I hope the question makes sense.
The topic ‘Query_posts multiple dynamic checkboxes from custom post’ is closed to new replies.