WP_Query Order by Taxonomy
|Reported by:||justindgivens||Owned by:|
|Component:||Query||Keywords:||has-patch needs-testing 2nd-opinion|
To be able to order by a taxonomy for any post type.
'orderby' => 'tax'
'tax_name' => 'taxonomy_name'
This way you can sort the post by the Term->name (ASC/DESC) value.
It was something needed in one of my projects and thought the WP community might like it.
Change History (6)
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
comment:4 @marsjaninzmarsa — 6 weeks ago
- Keywords 2nd-opinion added
- Resolution wontfix deleted
- Status changed from closed to reopened