Search multiple custom fields by using meta_query

Yes, since WP 3.2 you can set the ‘relation’ arg:

'meta_query' => array(
    'relation' => 'OR',
    array('key' => '_product_make','compare' => 'LIKE','value' => $strsearch),
    array('key' => '_product_model','compare' => 'LIKE','value' => $strsearch)
)

See http://core.trac.wordpress.org/ticket/17011

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)