[wp-hackers] query_posts with multiple meta keys and values?

Dion Hulse (dd32) wordpress at dd32.id.au
Sun Aug 16 01:42:07 UTC 2009


No. The meta filtering only supports a single key, and/or a value. You can  
set the comparison so that you get meta_key = TestKey AND meta_value > 5  
however through the meta_compare option.

Using a custom taxonomy is a better option for times where you have a Item  
with multiple values and you want to query for objects with Value1,  
Value2, and Value3 And also in OtherTaxonomyValue6


On Sun, 16 Aug 2009 11:36:28 +1000, Jason <jason at findingsimple.com> wrote:

> Is it possible to filter posts using query_posts() against multiple meta
> keys and values?
>
> Hoping I don't have to write custom queries...
>
> Thanks in advance,
> Jason
>
> www.findingsimple.com
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list