Skip to main content

WordPress - Hide Google Site Kit from the Admin Menu

·38 words
icysamon
Author
icysamon
Electronics & Creator

Add the following code to your theme’s functions.php file.

// Hide the google site kit menu
function hide_plugin() {
    remove_menu_page('googlesitekit-dashboard');
    remove_submenu_page('googlesitekit-dashboard', 'googlesitekit-splash');
}
add_action('admin_menu', 'hide_plugin', 100);

// remove tool bar item
function remove_toolbar_node($wp_admin_bar) {$wp_admin_bar->remove_menu("google-site-kit");
}
add_action("admin_bar_menu", "remove_toolbar_node", 100);