Excluding a Tag in Query
-
I’m trying to exclude a tag in a query using this:
<?php $my_query = new WP_Query(array( 'cat'=>'42', 'tag__not_in'=>array('notes'), ) ); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?>
And it doesn’t seem to work. This is based on:
https://www.ads-software.com/support/topic/152904
https://boren.nu/archives/2007/10/01/taxonomy-intersections-and-unions/Any help is greatly appreciated.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Excluding a Tag in Query’ is closed to new replies.