I have two categories, visible and hideMe...
I want to list all posts in the visible category, which is easy enough. However, due to user error (or oversight) there may be some posts which are in both categories.
How can I pull the posts that are in the visible category but not also in the hideMe category?
Here's my current solution. I'm just not certain that the get_posts method is the least expensive option I could use...
$cat=get_cat_ID('visible');
$cat2=get_cat_ID('hideMe');
$myposts = get_posts(array('cat' => "$cat,-$cat2",'showposts' => 5));
if($myposts )
{//do something}