[wp-trac] [WordPress Trac] #14645: Support for multiple meta_key => meta_value pairs in WP_Query
WordPress Trac
wp-trac at lists.automattic.com
Fri Sep 17 16:13:06 UTC 2010
#14645: Support for multiple meta_key => meta_value pairs in WP_Query
-------------------------+--------------------------------------------------
Reporter: joehoyle | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: 3.1
Component: Query | Version:
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Changes (by scribu):
* milestone: Awaiting Review => 3.1
Comment:
With [15624], you can manipulate the $meta_query var before the SQL is
generated:
{{{
function manipulate_meta_query( $wp_query ) {
$wp_query->meta_query[] = array(
'meta_key' => 'foo',
'meta_value' => 'bar',
'meta_compare' => '>',
);
}
add_action('pre_get_posts', 'manipulate_meta_query');
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14645#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list