Last active
June 16, 2024 07:04
-
-
Save mspalex/93bcaa987f10fdf19418 to your computer and use it in GitHub Desktop.
Wodpress - Remove Admin WP Logo and Submenu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Code to remove the WP Logo and Submenu from the Admin | |
add_action( 'wp_before_admin_bar_render', 'remove_logo_and_submenu' ); | |
function remove_logo_and_submenu() { | |
global $wp_admin_bar; | |
$wp_admin_bar->remove_menu('wp-logo'); | |
$wp_admin_bar->remove_menu('about'); | |
$wp_admin_bar->remove_menu('wporg'); | |
$wp_admin_bar->remove_menu('documentation'); | |
$wp_admin_bar->remove_menu('support-forums'); | |
$wp_admin_bar->remove_menu('feedback'); | |
$wp_admin_bar->remove_menu('comments'); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment