Thanks Geoff
I added the code (only changed the category name to e.g. Internt) and I the events was hided in the list view, but how can I have it to be shown in the calendar view?
// Removes categories “Internt” from list views
add_action( ‘pre_get_posts’, ‘exclude_events_category’ );
function exclude_events_category( $query ) {
if ( $query->query_vars[‘eventDisplay’] == ‘list’ && !is_tax(TribeEvents::TAXONOMY) || $query->query_vars[‘eventDisplay’] == ‘month’ && $query->query_vars[‘post_type’] == TribeEvents::POSTTYPE && !is_tax(TribeEvents::TAXONOMY) && empty( $query->query_vars[‘suppress_filters’] ) ) {
$query->set( ‘tax_query’, array(
array(
‘taxonomy’ => TribeEvents::TAXONOMY,
‘field’ => ‘slug’,
‘terms’ => array(‘Internt’),
‘operator’ => ‘NOT IN’
)
)
);
}
return $query;
}