WP_Query Order by Taxonomy
|Reported by:||justindgivens||Owned by:|
|Component:||Query||Keywords:||has-patch needs-testing 2nd-opinion close|
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 (7)
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
- Keywords 2nd-opinion added
- Resolution wontfix deleted
- Status changed from closed to reopened