Remove category from calendar view
-
I have a problem by a filter remove a category from the calendar. If i load the current month i can see entries that have my category tagged that i do not want to be visible. But if i click next month i still can see entries that should be hidden.. if i click next month and then back one month, then the entries are hidden. Whats happening?
add_filter( 'tribe_events_views_v2_view_month_repository_args', 'tec_exclude_events_category', 1000, 3 ); add_filter( 'tribe_events_views_v2_view_list_repository_args', 'tec_exclude_events_category', 1000, 3 ); add_filter( 'tribe_events_views_v2_view_day_repository_args', 'tec_exclude_events_category', 1000, 3 ); add_filter( 'tribe_events_views_v2_view_photo_repository_args', 'tec_exclude_events_category', 1000, 3 ); add_filter( 'tribe_events_views_v2_view_week_repository_args', 'tec_exclude_events_category', 1000, 3 ); add_filter( 'tribe_events_views_v2_view_map_repository_args', 'tec_exclude_events_category', 1000, 3 ); function tec_exclude_events_category( $repository_args, $context, $view ) { // List of category slugs to be excluded $excluded_categories = [ 'category-to-remove' ]; $repository_args['category_not_in'] = $excluded_categories; return $repository_args; }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Remove category from calendar view’ is closed to new replies.