0

Is there a way to display custom select box containing list of WordPress posts categories in my metabox?

(also my metabox in custom post)

Here are the illustrations:

This are categories from built-in WordPress post type

enter image description here

And this one is metabox from my cutom post type, how to display WordPress categories into this dropdown list ?

enter image description here

  • 2
    The answer to "is it possible" is typically "yes". Please elaborate on how are you implementing metabox, what have you tried and what specific issues had you encountered trying to achieve it. – Rarst Dec 13 '13 at 15:39
  • 3
    How you are displaying the meta-box ? have you used any custom metabox plugin ?( like Rilwis's ) A category dropdown can be generated like this: wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'select_name', 'hierarchical' => true)); – Subharanjan Dec 13 '13 at 16:06
  • no, i create my own metabox using custom html inside it, ah thanks, it's seen on my dropdown now. and just save it with categories ID inside dropdown menu,right ?. – user3073032 Dec 13 '13 at 16:15

Your Answer

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

Browse other questions tagged or ask your own question.