wordpress custom fields multiple data

You can store an array in a custom field; WordPress serializes it for you on save and unserializes it on get.

Name your fields with a pseudo array syntax:

<input name="mycustomfield">
<input name="mycustomfield[date]">

You’ll get a $_POST array:

mycustomfield = array ( 'audio' => 'somevalue', 'date' => 'somedate' )

Now you can do whatever you want with it.

Drawback: Meta queries against serialized arrays are hard. Multiple post meta field are much easier to handle.

tech