0

Im using wp_dropdown_categories to output terms in dropdown menu but it only shows terms that are related to published posts.

I wonder if there's a way / hack to include terms that are related to pending and draft posts?


Codex doesn't say anything about that, also searching the web didn't give any results.

1

I think you are meaning terms and not taxonomies. For clarity on which is which, see my answer here

In general, terms without published posts are considered empty and are hidden in functions like wp_dropdown_categories().Setting hide_empty to 0 (false) in your arguments will display all terms, even the "empty" ones.

  • Thanks for pointing that out. Yes, I meant terms. I was hoping there was some kind of undocumented argument or something.. It sucks then, I don't want to show empty dropdown, I also don't need to show every single one. – N00b Dec 26 '15 at 12:42

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.