I can't seem to get "tag__not_in" to work, is it confirmed as working in 2.8.6? The following query still returns posts that have the tag I'm trying to exclude:
<ul>
<?php
global $schoolCats;
$schools_parent = 26;
$args=array(
'posts_per_page'=> 2,
'cat'=> $schoolCats,
'tag__not_in'=> array(28),
);
$schoolPosts = new WP_Query($args);
while ($schoolPosts->have_posts()) : $schoolPosts->the_post();
setup_postdata($post);
$cats = get_the_category();
$school = "";
foreach($cats as $category)
{
if ($category->category_parent == $schools_parent){
$school .= $category->cat_name;
}
}
?>
<li>
<a href="<?php the_permalink();?>"><?php the_title(); ?></a><br /><strong><?php echo $school; ?></strong><br />
<?php the_excerpt(); ?>
</li>
<?php endwhile; ?>
</ul>
Basically, this is just a loop to display a bunch of posts that aren't tagged with the tag "resource" (tag ID = 28). I have no idea why it's not working, I'd be very grateful of any ideas?