﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	focuses
7798	tag__not_in doesn't seem to work in filters	gmorehoudh		"I'm attempting to exclude posts with a certain tag from feeds under certain conditions.  I'm using {{{tag__not_in}}}, but many more posts are disappearing from the feed than are tagged with the particular tag.  I've double-checked the tag ID in the database and the manage tags page in the admin interface, so it's not incorrect in my code.


{{{
function hide_noaff_posts_from_feed($post) {
	global $query_string;
	if(is_feed()) {
		$vars = parse_str($query_string);
		$vars['tag__not_in'] = array(28);	// 28 is the id of the 'noaff' tag in the terms table
		query_posts($vars);
	}
}

[...]

add_action('loop_start', 'hide_noaff_posts_from_feed');
}}}

and

{{{
function fff($query) {
	$query->set('tag__not_in', array(28));
	
	return $query;
}

[...]

add_filter('pre_get_posts', 'fff');
}}}

Neither of these work properly.  They exclude many posts, but I've only tagged one with the tag with id 28."	defect (bug)	closed	normal		General		normal	invalid			
