-
Home
-
Co-Authors, Multiple Authors and Guest Authors in an Author Box with PublishPress Authors
- Tips
How to Hide PublishPress Authors Admin Menus
function plt_hide_publishpress_authors_menus() {
//Hide "Author Profile".
remove_menu_page('term.php?taxonomy=author&tag_ID=5');
//Hide "Authors".
remove_menu_page('ppma-authors');
//Hide "Authors → Authors".
remove_submenu_page('ppma-authors', 'edit-tags.php?taxonomy=author');
//Hide "Authors → Author Boxes".
remove_submenu_page('ppma-authors', 'edit.php?post_type=ppma_boxes');
//Hide "Authors → Author Categories".
remove_submenu_page('ppma-authors', 'ppma-author-categories');
//Hide "Authors → Author Fields".
remove_submenu_page('ppma-authors', 'edit.php?post_type=ppmacf_field');
//Hide "Authors → Author Lists".
remove_submenu_page('ppma-authors', 'ppma-author-list');
//Hide "Authors → Author Pages".
remove_submenu_page('ppma-authors', 'ppma-author-pages');
//Hide "Authors → Settings".
remove_submenu_page('ppma-authors', 'ppma-modules-settings');
//Hide "Authors → Upgrade to Pro".
remove_submenu_page('ppma-authors', 'ppma-authors-menu-upgrade-link');
}
add_action('admin_menu', 'plt_hide_publishpress_authors_menus', 21);
Where do I put this code?
How to Hide PublishPress Authors Meta Boxes
function plt_hide_publishpress_authors_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Authors" meta box.
remove_meta_box('ppma_authorsdiv', $screen->id, 'side');
//Hide the "Author Box Preview" meta box.
remove_meta_box('ppma_boxes_preview_area', $screen->id, 'normal');
//Hide the "Author Box Editor" meta box.
remove_meta_box('ppma_boxes_editor_area', $screen->id, 'normal');
//Hide the "Layout Slug" meta box.
remove_meta_box('ppma_boxes_layout_slug', $screen->id, 'side');
//Hide the "Shortcode" meta box.
remove_meta_box('ppma_boxes_shortcode', $screen->id, 'side');
//Hide the "Banner" meta box.
remove_meta_box('ppma_boxes_banner', $screen->id, 'side');
//Hide the "Banner" meta box.
remove_meta_box('ppmacf_sidebar_banner', $screen->id, 'side');
//Hide the "Details" meta box.
remove_meta_box('ppmacf_details', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_publishpress_authors_metaboxes', 20);