tag__not_in for multiple tags?
-
Hello,
How might I change the following code so that it outputs all posts that don’t include the tag ID of both 12 and 22?
$my_query = new WP_Query('post_type=plants&posts_per_page=999&orderby=title&order=ASC&tag__not_in=12'); while ($my_query->have_posts()) : $my_query->the_post();
I have tried the following, but it doesn’t work:
$my_query = new WP_Query('post_type=plants&posts_per_page=999&orderby=title&order=ASC&tag__not_in=12,22'); while ($my_query->have_posts()) : $my_query->the_post();
Many thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘tag__not_in for multiple tags?’ is closed to new replies.