I need to obtain all the posts that have the same tag. But I have the difficult situation that Ive created a new post type called video (instead of post i create videos)
When I make
$args = array( ‘numberposts’ => 10, ‘order’=> ‘ASC’,’post_type’ => ‘video’);
$blablabla = query_posts($args);
I have a result, but when I add the ‘tag’=>’whatevertag’ I dont receive anything. Do you know why have i got this problem?
Thanks for all
Have you think about using instead meta_key or meta_value modify the custom_post to use category?
http://codex.wordpress.org/Function_Reference/get_cat_ID
$catId = get_cat_ID($categoryname);
and then in the args of the query insert ‘category’=>$catId