[wp-hackers] Using Meta Keys with pre_get_posts ?

Almost George WP-Hackers List wp-hackers-list at almostexciting.com
Thu Apr 15 13:47:03 UTC 2010


On Thu, Apr 15, 2010 at 2:13 AM, scribu <scribu at gmail.com> wrote:
> Checking a single meta key value is easy:
>
>
> function check_meta_key($wp_query) {
>    $wp_query->set('meta_key', 'my_key');
>    $wp_query->set('meta_value', 'my_value);
> }
> do_action('parse_query', 'check_meta_key');
>

Thanks! Is it possible to use conditionals, like "less than" or "not
equal to" here? What might that look like?


More information about the wp-hackers mailing list