Opened 12 years ago
Last modified 6 years ago
#21744 reopened enhancement
WP_User_Query does not support post type
Reported by: | AliMH | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 3.4.1 |
Component: | Users | Keywords: | has-patch |
Focuses: | Cc: |
Description
unfortunately WP_User_Query only support 'post' right now.
i've attached my modified user.php
Attachments (2)
Change History (13)
#4
@
12 years ago
Please take also a look at http://make.wordpress.org/core/handbook/submitting-a-patch/.
#6
in reply to:
↑ 1
@
12 years ago
- Keywords has-patch added
Replying to wonderboymusic:
WP_User_Query is meant to query and/or join wp_users and wp_usermeta, neither of which have anything to do with posts, unless you are talking about ordering by post_count? What's your use case? Are you trying to order authors by their post count for a particular post_type?
sorry'i'm new in add patch to wordpress trac, thanks john for your help.
yea in post_count it's only support 'post' but most of time we need get post_count per post types.
this patch is not a big deal but need by alot of serious developer.
#8
follow-up:
↓ 10
@
9 years ago
- Resolution set to wontfix
- Status changed from new to closed
This is something that can easily be done using custom query code, and isn't something core would benefit from by adding. Closing as wontifix
#10
in reply to:
↑ 8
@
6 years ago
- Resolution wontfix deleted
- Status changed from closed to reopened
Replying to chriscct7:
This is something that can easily be done using custom query code, and isn't something core would benefit from by adding. Closing as wontifix
after a long time i again face same problem and come to check if it become in core or not!
i knew that's possible with custom query and i'm doing this with custom query but when it's possible done this in core by just changing two lines in core and query support custom post type ,just ignore it!?
WP_User_Query is meant to query and/or join wp_users and wp_usermeta, neither of which have anything to do with posts, unless you are talking about ordering by post_count? Even so, your 'post-type' query arg doesn't change the SQL.
What's your use case? Are you trying to order authors by their post count for a particular post_type?