The script below should be exluding items that are assigned to the "my-menu" category. However, they are still showing up. Can someone help me identify the logic flaw?
<?php
global $post;
$cat=get_cat_ID('my-menu');
$catHidden=get_cat_ID('hidden');
$count=0;
$myposts2=get_posts(array('post__not_in'=>get_option('sticky_posts'),'cat'=>-$cat,'cat'=>-$catHidden,'showposts'=>5));
foreach($myposts2 as $post) :
$count++;
?><li><a href="<?php
the_permalink();
?>"><?php
the_title();
?></a></li><?php
endforeach;
?>