WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a custom taxonomy filled with terms that I wish to display in a fashion such as below.

<option value="[SLUG]">[TERM]</option>
<option value="[SLUG]">[TERM]</option>
<option value="[SLUG]">[TERM]</option>

I have attempted to use "wp_dropdown_categories" but I was unable to find a way to change the value="[TERM_ID]" to value="[SLUG]"

I also tried to use "wp_list_categories" and have it display with out the li's hoping there was a tag like "wp_nav_menu" has with 'before'=>'','after'=>'' but the documentation for "wp_list_categories" doesn't seem to support that.

If you have any ideas on how to accomplish this it would be much appreciated.

share|improve this question
up vote 1 down vote accepted

Use get_terms and output the term objects within whatever markup you need:

$terms = get_terms( 'your-taxonomy' );

if ( $terms ){

    echo '<select>';

    foreach ( $terms as $term ) {
        echo '<option value="' . $term->slug . '">' . $term->name . '</option>';

    echo '</select>';

share|improve this answer
this is perfect. – Phil Hoyt Jul 26 '13 at 3:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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