-
Home
-
WordPress Event Calendar
- Tips
How to Hide SpoonTalk Event Calendar Admin Menus
function plt_hide_spoontalk_event_calendar_menus() {
//Hide "Events".
remove_menu_page('edit.php?post_type=stec_custom_event');
//Hide "Events → Events".
remove_submenu_page('edit.php?post_type=stec_custom_event', 'edit.php?post_type=stec_custom_event');
//Hide "Events → Add Post".
remove_submenu_page('edit.php?post_type=stec_custom_event', 'post-new.php?post_type=stec_custom_event');
//Hide "Events → Event Categories".
remove_submenu_page('edit.php?post_type=stec_custom_event', 'edit-tags.php?taxonomy=stec_event_category&post_type=stec_custom_event');
//Hide "Events → FAQ".
remove_submenu_page('edit.php?post_type=stec_custom_event', 'spoontalk-event-calendar/faq.php');
}
add_action('admin_menu', 'plt_hide_spoontalk_event_calendar_menus', 11);
Where do I put this code?
How to Hide the "Fill Events" Meta Box
function plt_hide_spoontalk_event_calendar_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Fill Events" meta box.
remove_meta_box('myplugin_sectionid', $screen->id, 'advanced');
}
add_action('add_meta_boxes', 'plt_hide_spoontalk_event_calendar_metaboxes', 20);