One of the things that Zain Balkhi complained about when we were designing our current WPBeginner design was that the WordPress admin menu doesn’t float. Which is why in our current design, we made sure that our menu scrolled with the user. Recently we got an email from Till Kruess notifying us about a plugin that he has created which allows you to float your WordPress admin menu.
First thing you need to do is install and activate the Floating Admin Menu plugin.
The plugin will activate itself. If the viewport (window size) is taller than the admin menu itself, then the WordPress admin menu will float. This will save you time from scrolling up to access the menu when you are on a long admin page. The floating can be disabled on a per user basis under profile settings.
It currently does not work on mobile devices and tablets.
To see the preview of this plugin and download it, visit the official repository page of Floating Admin Menu plugin.
Thanks for that. It wasn’t one of my frustrations, but I think it will be very helpful!
I don’t get it; this code does the same thing:
function favicon4admin() {
echo ‘<style>#wpadminbar{position:fixed;}</style>’;}
add_action(‘admin_head’, ‘favicon4admin’);
For example the plugin handles use cases where your code would make the admin menu inaccessible, like when the viewport is resized to a smaller size than the admin menu, or when the admin menu is expanded and it’s height ends up being higher than the viewport.
Where to put that code Baris?