[wp-hackers] Using Meta Keys with pre_get_posts ?

scribu scribu at gmail.com
Thu Apr 15 07:13:21 UTC 2010


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');


-- 
http://scribu.net


More information about the wp-hackers mailing list