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.
Use
get_terms
and output the term objects within whatever markup you need: