-
Home
-
The Events Calendar
- Tips
How to Hide The Events Calendar Admin Menus
function plt_hide_the_events_calendar_menus() {
//Hide "Tools → Scheduled Actions".
remove_submenu_page('tools.php', 'action-scheduler');
//Hide "Events".
remove_menu_page('edit.php?post_type=tribe_events');
//Hide "Events → First Time Setup".
remove_submenu_page('edit.php?post_type=tribe_events', 'first-time-setup');
//Hide "Events → Events".
remove_submenu_page('edit.php?post_type=tribe_events', 'edit.php?post_type=tribe_events');
//Hide "Events → Add New Event".
remove_submenu_page('edit.php?post_type=tribe_events', 'post-new.php?post_type=tribe_events');
//Hide "Events → Tags".
remove_submenu_page('edit.php?post_type=tribe_events', 'edit-tags.php?taxonomy=post_tag&post_type=tribe_events');
//Hide "Events → Event Categories".
remove_submenu_page('edit.php?post_type=tribe_events', 'edit-tags.php?taxonomy=tribe_events_cat&post_type=tribe_events');
//Hide "Events → Venues".
remove_submenu_page('edit.php?post_type=tribe_events', 'edit.php?post_type=tribe_venue');
//Hide "Events → Organizers".
remove_submenu_page('edit.php?post_type=tribe_events', 'edit.php?post_type=tribe_organizer');
//Hide "Events → Import".
remove_submenu_page('edit.php?post_type=tribe_events', 'aggregator');
//Hide "Events → Settings".
remove_submenu_page('edit.php?post_type=tribe_events', 'tec-events-settings');
//Hide "Events → Help".
remove_submenu_page('edit.php?post_type=tribe_events', 'tec-events-help-hub');
//Hide "Events → Troubleshooting".
remove_submenu_page('edit.php?post_type=tribe_events', 'tec-troubleshooting');
//Hide "Events → Event Add-Ons".
remove_submenu_page('edit.php?post_type=tribe_events', 'tribe-app-shop');
}
add_action('admin_menu', 'plt_hide_the_events_calendar_menus', 101);
Where do I put this code?
How to Hide The Events Calendar Meta Boxes
function plt_hide_the_events_calendar_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Event Options" meta box.
remove_meta_box('tribe_events_event_options', $screen->id, 'side');
//Hide the "The Events Calendar" meta box.
remove_meta_box('tribe_events_event_details', $screen->id, 'normal');
//Hide the "Events Status" meta box.
remove_meta_box('tribe-events-status', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_the_events_calendar_metaboxes', 20);
How to Hide the "News from The Events Calendar" Dashboard Widget
function plt_hide_the_events_calendar_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "News from The Events Calendar" widget.
remove_meta_box('tribe_dashboard_widget', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_the_events_calendar_dashboard_widgets', 20);