-
Home
-
Event Tickets and Registration
- Tips
How to Hide Event Tickets Admin Menus
function plt_hide_event_tickets_menus() {
//Hide "Tools → Scheduled Actions".
remove_submenu_page('tools.php', 'action-scheduler');
//Hide "Tickets".
remove_menu_page('tec-tickets');
//Hide "Tickets → Home".
remove_submenu_page('tec-tickets', 'tec-tickets');
//Hide "Tickets → All Tickets".
remove_submenu_page('tec-tickets', 'tec-tickets-admin-tickets');
//Hide "Tickets → Attendees".
remove_submenu_page('tec-tickets', 'tec-tickets-attendees');
//Hide "Tickets → Settings".
remove_submenu_page('tec-tickets', 'tec-tickets-settings');
//Hide "Tickets → Help".
remove_submenu_page('tec-tickets', 'tec-tickets-help');
//Hide "Tickets → Troubleshooting".
remove_submenu_page('tec-tickets', 'tec-tickets-troubleshooting');
}
add_action('admin_menu', 'plt_hide_event_tickets_menus', 101);
Where do I put this code?
How to Hide the "Tickets" Meta Box
function plt_hide_event_tickets_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Tickets" meta box.
remove_meta_box('tribetickets', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_event_tickets_metaboxes', 20);