#27026 closed defect (bug) (fixed)
wp_user_query order by meta_value not working when using role insider $args
Reported by: | ecommy | Owned by: | kovshenin |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | 3.8.1 |
Component: | Users | Keywords: | |
Focuses: | Cc: |
Description
Regarding:
https://core.trac.wordpress.org/ticket/21581
this code will not sort users using last name because of the role=subscriber inside args.
$args = array( 'role' => 'Subscriber', 'orderby' => 'meta_value', 'order' => 'ASC', 'meta_key ' => 'last_name', 'number' => $limit, 'offset' => $offset ); $wp_user_query = new WP_User_Query( $args ); $users = $wp_user_query->get_results();
Change History (5)
Note: See
TracTickets for help on using
tickets.
#27027 was marked as a duplicate.