WordPress.org

Make WordPress Core

Opened 20 months ago

Last modified 16 months ago

#21744 new 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)

user.php (45.2 KB) - added by AliMH 20 months ago.
21744.patch (761 bytes) - added by johnbillion 20 months ago.

Download all attachments as: .zip

Change History (9)

AliMH20 months ago

comment:1 follow-up: wonderboymusic20 months ago

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?

Last edited 20 months ago by wonderboymusic (previous) (diff)

comment:2 SergeyBiryukov20 months ago

  • Keywords reporter-feedback added; has-patch removed

comment:3 scribu20 months ago

  • Cc scribu added

johnbillion20 months ago

comment:5 johnbillion20 months ago

AliMH's change in patch format

comment:6 in reply to: ↑ 1 AliMH20 months 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.

comment:7 SergeyBiryukov16 months ago

  • Keywords reporter-feedback removed

Related: #23045

Note: See TracTickets for help on using tickets.