#30306 closed enhancement (fixed)
wp_dropdown_categories values as slug
| Reported by: | gputignano | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.2 |
| Component: | Taxonomy | Version: | 4.0 |
| Severity: | normal | Keywords: | has-patch dev-feedback |
| Cc: | Focuses: |
Description
wp_dropdown_categories returns value attribute in option tag as a numeric value. It could be better to choose it between an id or slug. For example if I want to filter a post list by a taxonomy I have to set taxonomy value to slug in global $query var.
Attachments (2)
Change History (10)
#1
@
12 years ago
This isn't a bad idea. You could add an argument to the wp_dropdown_categories() called 'value_field' and set the value as 'slug' or any other part of the $category object (e.g. 'name').
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
value_field argument