-
Home
-
BugPost
- Tips
How to Hide BugPost Admin Menus
function plt_hide_bugpost_menus() {
//Hide "BugPost".
remove_menu_page('bugpost');
//Hide "BugPost → Settings".
remove_submenu_page('bugpost', 'bugpost');
//Hide "BugPost → All Reports".
remove_submenu_page('bugpost', 'edit.php?post_type=bugpost_report');
//Hide "BugPost → Summary".
remove_submenu_page('bugpost', 'bugpost-summary');
}
add_action('admin_menu', 'plt_hide_bugpost_menus', 11);
Where do I put this code?
How to Hide BugPost Meta Boxes
function plt_hide_bugpost_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Report Details" meta box.
remove_meta_box('bugpost_details', $screen->id, 'normal');
//Hide the "Auto-Captured Context" meta box.
remove_meta_box('bugpost_context', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_bugpost_metaboxes', 20);