-
Home
-
Visitor Maps and Who's Online
- Tips
How to Hide Visitor Maps and Who's Online Admin Menus
function plt_hide_visitor_maps_menus() {
//Hide the "Settings → Visitor Maps" menu.
remove_submenu_page('options-general.php', 'visitor-maps/visitor-maps.php');
//Hide the "Dashboard → Who's Online" menu.
remove_submenu_page('index.php', 'visitor-maps');
//Hide the "Dashboard → Who's Been Online" menu.
remove_submenu_page('index.php', 'whos-been-online');
}
add_action('admin_menu', 'plt_hide_visitor_maps_menus', 11);
Where do I put this code?
How to Hide the "Visitor Maps - Who's Online" Dashboard Widget
function plt_hide_visitor_maps_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Visitor Maps - Who's Online" widget.
remove_meta_box('visitor_maps_dashboard_widget', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_visitor_maps_dashboard_widgets', 20);