Hi all,
I am trying to execute a query with query_posts, combining category__in and tag__in parameters. Well, it returns nothing :) Is it possible to combine these two parameters anyway?
$post_categories = get_the_category($post->ID);
$post_tags = get_the_tags($post->ID);
//print_r($post_tags);
$tags = array();
if (is_array($post_tags)){
foreach($post_tags as $tag) $tags[] = $tag->term_id;
}
$categories = array();
foreach($post_categories as $cat) $categories[] = $cat->cat_ID;
//print_r($categories);print_r($tags);
query_posts(array( 'category__in'=>$categories , 'tag__in'=>$tags , 'post__not_in'=>array($post->ID) , 'caller_get_posts'=>1 ));