[wp-trac] [WordPress Trac] #14368: make the 'orderby' argument in get_posts() accept all "post" fields
WordPress Trac
noreply at wordpress.org
Mon Aug 1 15:09:02 UTC 2022
#14368: make the 'orderby' argument in get_posts() accept all "post" fields
-------------------------+-----------------------
Reporter: wjm | Owner: (none)
Type: enhancement | Status: reopened
Priority: normal | Milestone:
Component: Query | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+-----------------------
Changes (by pbiron):
* status: closed => reopened
* resolution: maybelater =>
Comment:
I have a need to sort by post_excerpt.
It's not hard to hook into
[https://developer.wordpress.org/reference/hooks/posts_orderby/
posts_orderby] to achieve this, but it really should be handled by
WP_Query.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/14368#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list