-
Home
-
Editorial Calendar and Marketing Content Overview – PublishPress Planner
- Tips
How to Hide PublishPress Planner Admin Menus
function plt_hide_publishpress_menus() {
//Hide "Planner".
remove_menu_page('pp-calendar');
//Hide "Planner → Content Calendar".
remove_submenu_page('pp-calendar', 'pp-calendar');
//Hide "Planner → Content Overview".
remove_submenu_page('pp-calendar', 'pp-content-overview');
//Hide "Planner → Notifications".
remove_submenu_page('pp-calendar', 'edit.php?post_type=psppnotif_workflow');
//Hide "Planner → Editorial Metadata".
remove_submenu_page('pp-calendar', 'pp-editorial-metadata');
//Hide "Planner → Editorial Comments".
remove_submenu_page('pp-calendar', 'pp-editorial-comments');
//Hide "Planner → Settings".
remove_submenu_page('pp-calendar', 'pp-modules-settings');
//Hide "Planner → Upgrade to Pro".
remove_submenu_page('pp-calendar', 'pp-calendar-menu-upgrade-link');
}
add_action('admin_menu', 'plt_hide_publishpress_menus', 21);
Where do I put this code?
How to Hide PublishPress Planner Meta Boxes
function plt_hide_publishpress_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Metadata" meta box.
remove_meta_box('pp_editorial_meta', $screen->id, 'side');
//Hide the "Editorial Comments" meta box.
remove_meta_box('publishpress-editorial-comments', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_publishpress_metaboxes', 20);
How to Hide PublishPress Planner Dashboard Widgets
function plt_hide_publishpress_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Unpublished Content" widget.
remove_meta_box('post_status_widget', 'dashboard', 'normal');
//Remove the "Notepad" widget.
remove_meta_box('notepad_widget', 'dashboard', 'normal');
//Remove the "My Content Notifications" widget.
remove_meta_box('myposts_widget', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_publishpress_dashboard_widgets', 20);