#21581 closed enhancement (fixed)
Add orderby meta_value to WP_User_Query
Reported by: | wpsmith | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 3.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Users | Keywords: | has-patch |
Focuses: | Cc: |
Description
For some reason, we cannot easily order the WP_User_Query() by last_name without directly editing the SQL statements. However, there is an easy way to add this that would work parallel to WP_Query().
// prepare arguments $args = array( 'orderby' => 'meta_value', 'meta_key' => 'last_name', ); $user_query = new WP_User_Query( $args );
Attachments (1)
Change History (11)
#3
@
11 years ago
- Keywords 2nd-opinion dev-feedback removed
- Milestone changed from Awaiting Review to 3.7
Makes sense, patch still applies
#5
@
11 years ago
Duplicate: #17179 See patch: http://core.trac.wordpress.org/attachment/ticket/17179/17179.patch
#8
@
11 years ago
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed
In 25331:
#10
@
10 years ago
The patch that was added to this ticket 2 years ago, will this be added to the next upgrade of Wordpress or will I need to change the core files manually upon every upgrade?
Version 0, edited 10 years ago
by
(next)
Note: See
TracTickets for help on using
tickets.
Related: #20606, #20624