我想从我的主页中排除某个标签,而不是只包含标签的类别帖子,例如“olive”;
我找到了这样一个函数
function exclude_tag($query) {
if ( $query->is_home) {
$query-> set(\'tag__not_in\',array(x));
}
return $query;
}
add_filter(\'pre_get_posts\',\'exclude_tag\');
而X是我要排除的标记的ID。我怎样才能找到那个ID?