Is it possible to have a custom metabox with the ability to either:

  • enter a new meta_value in a certain meta_key OR
  • choose from a list of the existing meta_keys, from a dropdown/select-box, autocomplete/suggestions or anything else

(basically, the way category and tag meta-boxes work, only with custom fields not custom taxonomies)

Graphically, the box should look like this: metabox example

Can this be done with an existing plugin or code / how?

  • 1
    Yes it is possible. What have you tried already? – cybmeta Nov 13 '14 at 21:24
  • I tried practically all meta-box plug-ins, none has it but maybe I missed one. I can also do a simple meta-box add field manually, but I have no idea where to start for populating the select :( – user23068 Nov 13 '14 at 23:29
  • Just found that the plugins Magic Fields 2 (wordpress.org/plugins/magic-fields-2) together with Magic Fields 2 Toolkit (wordpress.org/plugins/magic-fields-2-toolkit) can technically do the job, but the formatting is weird and the functionality quirky, so many users would have trouble getting it to work. – user23068 Nov 14 '14 at 16:09
  • 1
    Code, I asked about what code have you tried. This site is about development, not about use third party software – cybmeta Nov 14 '14 at 22:20
  • Don't let me waste your time, I'll figure it out somehow and post the answer myself when I have it. – user23068 Nov 15 '14 at 1:20

Your Answer

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