#25892 closed enhancement (fixed)
tax_query docs
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | WordPress.org | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | WordPress.org Site | Keywords: | |
| Focuses: | Cc: |
Description
hi, not 100% sure but on tax_query documentation
http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters
Taxonomy Parameters > tax_query > field (string) - Select taxonomy term by ('id' or 'slug')
shouldn't be by ('term_id' or 'slug')?
All references I see in the core use term_id.
In a custom tax_query if I use 'id' I get 1 additional query to get... the term_id :-) If I directly use 'term_id' it saves 1 query.
Change History (3)
Note: See
TracTickets for help on using
tickets.
It's supposed to be term_id, yes. Though 'id' simply falls through a default branch and ends up being 'term_id' anyway. I updated the Codex.