I have managed to save a custom meta field with multiple inputs to a post. The inputs are going like this:
<input type="text" name="menuitem[1][title]" />
<input type="text" name="menuitem[1][section]" />
<input type="text" name="menuitem[1][price]" />
<input type="text" name="menuitem[2][title]" />
<input type="text" name="menuitem[2][section]" />
<input type="text" name="menuitem[2][price]" /> etc.
And the data are stored in serialized arrays.
The reason I do it this way, is because I want to query the values of this field, related to each other. (e.g. to query posts sorted by menuitem[price] of menuitem[title]).
The problem is that WP-query can only read a single key value and cannot read serialized data.
Is there any better way to store meta keys so they are related to each other?
Any suggestions would be appriciated. Thank you