0

I have the following custom meta-box, which works to list a post type, I simply want to allow multiple values to be selected but cannot get it to work, it appears if I tell the select to store multiple and set the name to be an array Wordpress does not store any value.

http://pastebin.com/VLQGZjmu

After hours of trying with different meta-boxes I realise I must be close but am clearly missing something.

Many thanks in advance.

0

I'm not sure if select multiple value from the select box is what you want, but from a quick look at you code i would say you should put

<select name="'.$field['id'].'[]" id="'.$field['id'].'">

instead of

<select name="'.$field['id'].'" id="'.$field['id'].'">

since you want a multiple select. This is then a html problem, not a WP related.

| improve this answer | |
0

Try to use this plugin http://wordpress.org/extend/plugins/advanced-custom-fields/ I guess it will fit main part of your needs. Export to PHP in code available.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.