Skip to:

Reply To: How to move adminbar links to sidebar?




I think I’ve find an easy way to provide the effect you mentioned. It’s rather a css trick than a php-code way. Below is what I’ve find during this process:

First, I find the function bp_adminbar_notifications_menu() in bp-core-adminbar.php, but it only works when adminbar is enable, and it simply lists out all notifications rather than the “mouse-over” effect we want. It seems admin-bar.js is also required, which is totally beyond me.

So I realized that since it already requires adminbar to be enable in the first place, why are we bothering to duplicate this item, especially in so complex a way?

We just need to hide all other items in adminbar, and re-position the notification menu.

So finally I come up with this:

/** Play with admin-bar to grab notification menu */

#wp-admin-bar {
position: absolute;

#wp-admin-bar .padder {
background: none;

#wp-admin-bar .padder #admin-bar-logo, #wp-admin-bar .padder ul #bp-adminbar-account-menu, #wp-admin-bar .padder ul #bp-adminbar-blogs-menu, #wp-admin-bar .padder ul #bp-adminbar-thisblog-menu, #wp-admin-bar .padder ul #bp-adminbar-authors-menu, #wp-admin-bar .padder ul #bp-adminbar-visitrandom-menu {
display: none;

Now we have notification menu there, and it’s no longer a “always-in-the-front” item. What remains to be done is further defining the style of this little baby, its position, background color, font color, etc.

Hope this would do some help.

Skip to toolbar