[wp-hackers] Using Meta Keys with pre_get_posts ?

Almost George WP-Hackers List wp-hackers-list at almostexciting.com
Thu Apr 15 04:28:12 UTC 2010


I'm looking at filtering all default queries (*all* queries if
possible) by checking the value of a meta key. *I think* I understand
that this would be done using the pre_get_posts hook, but I'm not sure
what to do from there, especially concerning the "meta keys".

I've seen some examples that compare "cat=4" or similar, but not sure
how to translate that to work with custom fields/meta information.

Am I going in the right direction, and can anyone push me any further?

Thanks!


More information about the wp-hackers mailing list