I never use the WP menu (the logo and its child items) except when I click it accidentally. And it is wasting my time when I navigate per keyboard. Plus, the support page is not our site.
How can I remove it?
I never use the WP menu (the logo and its child items) except when I click it accidentally. And it is wasting my time when I navigate per keyboard. Plus, the support page is not our site.
How can I remove it?
You must be logged in to post a comment.
This menu is added in
WP_Admin_Bar::add_menus()
with an action:To remove it take the same action â just one step later. The following code works as a mu plugin or as a regular plugin:
It has a GitHub address too.
After the installation the sites menu is the first one.
See also this great answer for other menus and more details about the inner workings of the admin bar/tool bar.
Update
The old code doesnât work anymore, this one does:
also possible, only as hint:
@PieterGoosen & @kaiser
https://wordpress.org/plugins/osd-remove-all-wp-creds/
That is the link to the plugin. It removes quite a few WP plugs like:
The plugin code is commented pretty well, so it is easy to deduce what I have done and repeat it on your own in your functions.php file or whatever you choose.
Here are a few blocks of code from the plugin to answer the original question plus a bonus:
bonus: