-
Home
-
WP Private Content Plus
- Tips
How to Hide WP Private Content Plus Admin Menus
function plt_hide_wp_private_content_plus_menus() {
//Hide "Groups".
remove_menu_page('edit.php?post_type=wppcp_group');
//Hide "Groups → Groups".
remove_submenu_page('edit.php?post_type=wppcp_group', 'edit.php?post_type=wppcp_group');
//Hide "Groups → Add New Group".
remove_submenu_page('edit.php?post_type=wppcp_group', 'post-new.php?post_type=wppcp_group');
//Hide "Private Content Settings".
remove_menu_page('wppcp-settings');
//Hide "Private Content Settings → Private Content Settings".
remove_submenu_page('wppcp-settings', 'wppcp-settings');
//Hide "Private Content Settings → Global Restrictions".
remove_submenu_page('wppcp-settings', 'wppcp-global-restrictions');
//Hide "Private Content Settings → Search Settings".
remove_submenu_page('wppcp-settings', 'wppcp-search-settings-page');
//Hide "Private Content Settings → Password Settings".
remove_submenu_page('wppcp-settings', 'wppcp-password-settings-page');
//Hide "Private Content Settings → Private User Page".
remove_submenu_page('wppcp-settings', 'wppcp-private-user-page');
//Hide "Private Content Settings → Admin Permissions".
remove_submenu_page('wppcp-settings', 'wppcp-admin-permissions');
//Hide "Private Content Settings → Security Settings".
remove_submenu_page('wppcp-settings', 'wppcp-security-settings-page');
//Hide "Private Content Settings → Site Lockdown".
remove_submenu_page('wppcp-settings', 'wppcp-site-lockdown-settings-page');
//Hide "Private Content Settings → User Profiles Made Easy".
remove_submenu_page('wppcp-settings', 'wppcp-upme-settings');
//Hide "Private Content Settings → Getting Started".
remove_submenu_page('wppcp-settings', 'wppcp-help');
//Hide "Private Content Settings → PRO Version".
remove_submenu_page('wppcp-settings', 'wppcp-pro');
//Hide "Private Content Settings → Addons".
remove_submenu_page('wppcp-settings', 'wppcp-pro-addons');
//Hide "Private Content Settings → FAQ".
remove_submenu_page('wppcp-settings', 'https://www.wpexpertdeveloper.com/wp-private-content-plus-faq');
}
add_action('admin_menu', 'plt_hide_wp_private_content_plus_menus', 10000);
Where do I put this code?
How to Hide WP Private Content Plus Meta Boxes
function plt_hide_wp_private_content_plus_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "WP Private Content Plus - Restriction Settings" meta box.
remove_meta_box('wppcp-post-restrictions', $screen->id, 'normal');
//Hide the "WP Private Content Plus - File Attachments Settings" meta box.
remove_meta_box('wppcp-post-file-attachments-general', $screen->id, 'advanced');
//Hide the "WP Private Content Plus - Manage File Attachments" meta box.
remove_meta_box('wppcp-post-file-attachments', $screen->id, 'advanced');
//Hide the "WP Private Content Plus - Add New Users" meta box.
remove_meta_box('wppcp-groups-general', $screen->id, 'normal');
//Hide the "WP Private Content Plus - Group Members" meta box.
remove_meta_box('wppcp-groups-users', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_wp_private_content_plus_metaboxes', 20);