php - Find post of author with meta_key - Wordpress -


this's query:

$list = query_posts(array(     'post_type' => 'post',     'author' => $current_user->id,     'category__in' => array(11), )); 

it ok, when change to:

$list = query_posts(array(     'post_type' => 'post',     'author' => $current_user->id,     'category__in' => array(11),     'meta_key' => 'author_alias_id',     'meta_value' => '1' )); 

the result empty.

somebody can me?

$args = array(     'post_type'  => 'my_custom_post_type',     'meta_key'   => 'age',     'orderby'    => 'meta_value_num',     'order'      => 'asc',     'meta_query' => array(         array(             'key'     => 'age',             'value'   => array( 3, 4 ),             'compare' => 'in',         ),     ), ); 

refer example


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -