[wp-trac] [WordPress Trac] #31045: Ordering a Query Using Multiple Meta Keys

WordPress Trac noreply at wordpress.org
Sat Jan 31 15:47:54 UTC 2015


#31045: Ordering a Query Using Multiple Meta Keys
-----------------------------+---------------------------
 Reporter:  Funkatronic      |       Owner:  boonebgorges
     Type:  feature request  |      Status:  closed
 Priority:  normal           |   Milestone:  4.2
Component:  Query            |     Version:  trunk
 Severity:  normal           |  Resolution:  fixed
 Keywords:  has-patch        |     Focuses:
-----------------------------+---------------------------
Changes (by boonebgorges):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"31312"]:
 {{{
 #!CommitTicketReference repository="" revision="31312"
 Improve support for ordering `WP_Query` results by postmeta.

 `WP_Meta_Query` clauses now support a 'name' parameter. When building a
 `WP_Query` object, the value of 'orderby' can reference this 'name', so
 that
 it's possible to order by any clause in a meta_query, not just the first
 one
 (as when using 'orderby=meta_value'). This improvement also makes it
 possible
 to order by multiple meta query clauses (or by any other eligible field
 plus
 a meta query clause), using the array syntax for 'orderby' introduced in
 [29027].

 Props Funkatronic, boonebgorges.
 Fixes #31045.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31045#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list