How to dropdown custom taxonomy?

To make a dropdown list from categories I can use wp_dropdown_categories function.

http://codex.wordpress.org/Function_Reference/wp_dropdown_categories

Read More

But how can I do the same thing but for my custom taxnomy called e.g. post_city ?

So, far I tried:

<?php 
    $args = array(
        'taxonomy' => array(
           'post_city',
         ) 
    );
    ?>
<?php wp_dropdown_categories($args); ?>

but only the first tag is shown in the dropdown ;(

Related posts

1 comment

  1. SOLVED!!! ;D

    I need to use 'hide_empty' => 0 instead of 'hide_empty' => 1 in the arguments array like:

    <?php 
            $args = array(
                'taxonomy' => array(
                   'post_city',
                 ),
                'hide_empty' => 0
            );
        ?>
    

Comments are closed.