I am trying to use wp_dropdown_categories at front end. I got the dropdown box with default "uncategorized", the rest of the category is not there.

function cats_dropdown(){
    require_once(ABSPATH . '/wp-admin/includes/template.php');
    $args = array('taxonomy' => 'category');
     <?php wp_dropdown_categories($args); ?>

In the same function, if I try to output wp_terms_checklist, it works. This is confusing. Anything I missed in the dropdown?

3 Answers 3


It could be that it won't show empty categories, categories that has no posts attached to them.

Try to change $args = array('taxonomy' => 'category'); to $args = array('taxonomy' => 'category', 'hide_empty' => 0);


By default, wp_dropdown_categories only displays the categories that have posts. Set hide_empty argument to false to display all categories, even those without posts.

$args = array(
    'taxonomy'   => 'category'
    'hide_empty' => false

On the other hand, wp_terms_checklist will display all categories, even if they are empty.


You shouldn't need to define the taxonomy of category as that's the default. Have you tried just using the following?

<?php $args = array('show_option_none' => 'Categories', hide_empty => '0'); ?>
<?php wp_dropdown_categories($args); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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