[wp-trac] [WordPress Trac] #31045: Ordering a Query Using Multiple Meta Keys
WordPress Trac
noreply at wordpress.org
Sun Feb 1 02:55:55 UTC 2015
#31045: Ordering a Query Using Multiple Meta Keys
-----------------------------+---------------------------
Reporter: Funkatronic | Owner: boonebgorges
Type: feature request | Status: reopened
Priority: normal | Milestone: 4.2
Component: Query | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-----------------------------+---------------------------
Comment (by Funkatronic):
@DrewAPicture: one of my original ideas was to have the id just be the key
of that particular clause:
{{{
$args = array(
'post_type' => 'product',
'meta_query' => array(
'post_color' => array(
'key' => 'color',
'value' => 'blue',
'compare' => 'NOT LIKE',
),
),
'orderby' => 'post_color'
);
$query = new WP_Query( $args );
}}}
Does that make more sense as a syntax alternative?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31045#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list