Can I query custom meta data through WP_Query

Normally you would just specify a meta_value, e.g.:

 $args = array(
     'post_type' => 'business',
     'meta_query'  => array(
            array(
                'key' => 'specials',
                'value' => 'these are not the specials you are looking for - Obi Wan Kenobi'
            )
        )

);

However because your post meta is actually a data structure, a serialised PHP array/object, that’s not possible.

You can read more here:

http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters

Leave a Comment

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