-
Home
-
Members – Membership & User Role Editor Plugin
- Tips
How to Hide Members Admin Menus
function plt_hide_members_menus() {
//Hide "Members".
remove_menu_page('members');
//Hide "Members → Roles".
remove_submenu_page('members', 'roles');
//Hide "Members → Add New Role".
remove_submenu_page('members', 'members');
//Hide "Members → Settings".
remove_submenu_page('members', 'members-settings');
//Hide "Members → Add-Ons".
remove_submenu_page('members', 'members-settings&view=add-ons');
//Hide "Members → Payments".
remove_submenu_page('members', 'members-payments');
//Hide "Members → About Us".
remove_submenu_page('members', 'members-about');
//Hide "Members → Growth Tools".
remove_submenu_page('members', 'members-growth-tools');
}
add_action('admin_menu', 'plt_hide_members_menus', 10000);
Where do I put this code?
How to Hide the "Content Permissions (Members)" Meta Box
function plt_hide_members_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Content Permissions (Members)" meta box.
remove_meta_box('members-cp', $screen->id, 'advanced');
}
add_action('add_meta_boxes', 'plt_hide_members_metaboxes', 20);