WordPress Admin Bar

Description:

This plugin creates an admin bar at the top of your site for logged in users (i.e. you) based on the design of the admin bar located at WordPress.com. It has links to all popular areas of the admin area, saving you time.

It requires no theme editing whatsoever — just upload and activate and you’re done.

Download:

  • Download from WordPress.org (click me to obtain stats downloads total)

Adding Custom Themes:

If you’re the author of a WordPress theme or just otherwise wish to add an custom admin bar theme of your own, please check out this plugin’s theme API.

Screenshots:

Frequently Asked Questions

Q: Some plugins don’t show up in the admin bar. What gives?
A: The author of the problematic plugin has a is_admin() test when creating their admin menu which means that if you’re outside of the admin area, their plugin won’t register it’s admin menu. Therefore it of course won’t show up in my admin bar. Contact them and ask them to remove the is_admin() test (or do it yourself).

206 Comments On This Page

  1. OK, it does look pretty. Infact WP needs something like this by default, it might as well be yours.

  2. Another Viper007Bond plugin for my site :)

    Please keep up the work, this is well appreciated!

    Thanks!

  3. Updated to v1.0.1. :)

  4. Hello,

    Neat plugin, very comfortable. Thanks.

    What license is this plugin released under? I didn’t see any mention of copyright in the README.

    Presuming that it is released under a GPL compatible license, I’ll share my little patch with you. The patch adds an Akismet Spam entry to the Manage menu if the Akismet plugin is activated.

    The patch is available here: http://www.thewildbeast.co.uk/wordpress_patches/wpcom_adminbar-akismet.patch

    Best regards

    Paul

  5. Paul on September 22nd, 2006 at 9:39 PM wrote:

    The patch adds an Akismet Spam entry to the Manage menu if the Akismet plugin is activated.

    Good thinking, Paul. I totally forgot about Akismet. I’ll add it in. :)

  6. Okay, updated to version 1.0.2 with support for more plugins, including Akismet.

  7. Excellent admin bar, saves me alot of time when editing pages / changing options. Thanks Viper.

  8. Version 1.0.3 released. No need to upgrade unless you use Democracy or WordPress v2.1.

  9. I use the WP-ShortStat plugin, the WP-ShortStat page is a sub-page of Dashboard, so I hacked your code again to add support for it - always having to load the Dashboard seemed far too slow now that I was able to access all the other sub-pages so quickly and easily.

    You can find the patch here: http://www.thewildbeast.co.uk/wordpress_patches/wpcom_adminbar-WPshortstat.patch

    The patch is against version 1.0.3.

  10. Thanks Paul. I’m glad to add support for any plugin in which you’d need to access to from your main site. :)

  11. Mine doesn’t look the way it should. Everything’s pushed off to the right so one link is hidden behind the search box and I can’t click on all of the links in the pull down menus. HELP!!

  12. Sharon J on October 25th, 2006 at 8:15 AM wrote:

    Mine doesn’t look the way it should. Everything’s pushed off to the right so one link is hidden behind the search box and I can’t click on all of the links in the pull down menus. HELP!!

    Can you make me an account so I can login and see? It doesn’t have to be an account that can do anything, I just need to be able to login. E-mail me the details via my “Contact” link above. ;)

  13. hi, i cant get it work even though it has in it’s footer.php file. any help?

  14. duong nguyen on November 26th, 2006 at 4:17 AM wrote:

    hi, i cant get it work even though it has in it’s footer.php file. any help?

    I assume you’re logged in? Have you looked at the source of your page? Does the HTML for the admin bar show up near the bottom of the source (it’ll be rather apparent)?

    If it’s still not working, try temporarily switching to the default theme to see if it works.

  15. It shows the HTML code, and the admin bar is showing at the end of the page. You can see it here. Thanks 4 helping.

  16. Sorry this is the right link

  17. Both of those are 403 for me, but it appears that you did not upload the plugin correctly as the URL where it should be is 404.

    You need to keep it in a folder and all the files and folders inside it. It’s displaying at the bottom because it can’t load the CSS stylesheet that makes it appear at the top of your page.

  18. You were right, all I need to do was to change the folder’s name to “wpcom_adminbar” and it works perfectly. Thanks a lot for this great plug in.

  19. This plugin would be much more mobile and usable on varying Wordpress installations if it utilized the same (or similar) hooks found in wp-admin/menu-header.php for building the adminmenu and submenu hierarchy. This would prevent manual additions and alterations to the wpcom_adminbar function based on each Wordpress installation and it’s installed plugins…

  20. That’s actually a really good idea. Can’t believe I didn’t think of that. lol

  21. Just thought you would like to know that-for some reason-doesn’t work with the Sunburn (http://fightingfriends.com/sunburn/) theme. Doesn’t even appear in the sourceAh well, back to the default heme. The plugin is worth it. :)

    Cheers!
    Lanval

  22. lanval on December 26th, 2006 at 5:49 AM wrote:

    Just thought you would like to know that-for some reason-doesn’t work with the Sunburn (http://fightingfriends.com/sunburn/) theme. Doesn’t even appear in the source

    The theme is probably missing wp_footer(); from it’s footer.php which is the hook this plugin uses to output the bar. Just add it in if it doesn’t have it. :)

  23. Hello again Viper007Bond,

    I have another patch for your wpcom_adminbar plugin.
    It’s a bundled patch which does the following things:

    * fix Akismet Spam entry

    The function name changed in Akismet somewhere around version
    1.8. The patch adds a check for the new function name, at the same time keeping the old check in place.

    * add Links menu with submenu items
    Useful for me.

    * add support for the wpShortStat and wpStats plugins

    WP-ShortStat: http://dev.wp-plugins.org/wiki/wp-shortstat
    wpStats: http://www.biggleszx.com/category/wordpress/

    The patch is available from here:
    http://www.thewildbeast.co.uk/wordpress_patches/wpcom_adminbar-...

    regards,
    Paul

  24. Sorry, but this plugin is way back on my list of things to update. ;)

  25. Paul on January 24th, 2007 at 5:47 AM wrote:

    Sorry, but this plugin is way back on my list of things to update. ;)

    Not a problem for me — I can patch it to make it do what I want it to do. OTOH, (thinking aloud here), if you want to hand over the development of the plugin, then perhaps I’d be interested in that.

  26. I’m not ready to give up development of it quite yet. It’s just that I have a few plugins I need to update to work with 2.1 first as well as paid work. ;)

  27. I upgraded my WordPress installation to version 2.1, and so hacked wpcom_adminbar to support WordPress 2.1 (and only WordPress 2.1), primarily for my own use. But, I’m lettting you know just because it may save you some time when you do the update yourself.

    This patch adds support for the WP-ShortStat and wpStats plugins, modifies the menu layout and names to match those found in WP 2.1, adds the ‘Blogroll’ menu and submenu items, and fixes the Akismet Spam menu entry.

    The patch is here wpcom_adminbar_for_WordPress2.1_plus_extra_plugin_support.patch

    For the convenience of the other users who have upgraded to WP 2.1, who are as impatient as me, and are not able to apply a patch, I’ve created a zip archive of my modified version. Lest you think that I’m stepping on your toes too much with making a modified version available, I’d like to stress that this is announced nowhere but here. I’ll remove it from my server if you are not happy about a modified version floating around.

    Download here: wpcom_adminbar-1.0.3-twb.zip

    Many thanks for your plugin.
    regards
    Paul

  28. No, that’s fine. I’m the first to admit I’m too busy. ;)

  29. What would I need to edit to get this plugin to load on my blog even when I’m not logged on Viper?

    EDIT: Nevermind, found it.

  30. This plugin breaks the lightbox plugin apparently. I’ve enabled it and lightbox is no longer working :(

  31. Sorry for flooding your comments Viper, but it looks like I was wrong about your plugin breaking lightbox. The only peculiar thing that I have noticed is that on some sites, particularly where other javascript effects are in place, this plugin causes the page to scroll in a very peculiar way. Take a look at http://burhan.hadithuna.com when you get the chance.

    Thanks again for this excellent piece of work. I love it!

  32. this plugin does not work with WordPress v1.5.x??

  33. rolety on September 24th, 2007 at 10:23 AM wrote:

    this plugin does not work with WordPress v1.5.x??

    No, it doesn’t. You shouldn’t be using such an old version anyway as it’s insecure and likely to get hacked.

  34. Hi. I’m planing to upgrade my WP from 2.2.3 to 2.3
    Does this Admin Bar plugin works correct with 2.3 version?
    TIA.

  35. It does as it uses the WordPress API.

  36. thanks for the plugin!

  37. very useful plugin, thanks!

  38. This plugin has been completely recoded from the ground up and the new version is available on WordPress.org. :)

  39. Very nicely done Viper. I love the fact that you made it very easy to be used on WPMU just by flipping the $folder variable

  40. David Cohen on December 4th, 2007 at 10:03 AM wrote:

    Very nicely done Viper. I love the fact that you made it very easy to be used on WPMU just by flipping the $folder variable

    Heh, that wasn’t my intention, just a nice unintended side effect. :D

  41. The new version is great! Would it be possible to have the admin bar appear on the admin pages as well??

  42. Viper,

    Excellent plugin. The only problem I have is when I look at my site with IE, the bar shows up below the footer of the site. Which isn’t necessarily a problem because I use FireFox but some of my other authors still use IE. Just need to know if there is something I need to do to fix this.

    Again, excellent plugin and thanks.

    n8

  43. Hi. Great plugin… so much easier now… shame you can’t replace the dashboard completely with it, or at least have it there alongside the dashboard.. anyhow I digress so soon.

    It seems that some plugin authors put their config panels on the top level, but this plugin does not detect them, 2 that I have cound, podpress and CyStats. The first is not really a biggy, but the stats page is so nice to have.

    I have hand cranked a hard code in but any help much appreciated.

  44. Nigel Kane on December 17th, 2007 at 5:51 PM wrote:

    It seems that some plugin authors put their config panels on the top level, but this plugin does not detect them

    You need to contact the authors of those plugins then. My plugin supports additional top level menus and displays them correctly, if done right.

    Refer them to this page on the WP Codex.

  45. Nate on December 6th, 2007 at 10:17 AM wrote:

    The only problem I have is when I look at my site with IE, the bar shows up below the footer of the site.

    Must be an issue with your site or something. It works fine for me in IE7 with the default theme.

    Manne on December 6th, 2007 at 2:03 AM wrote:

    The new version is great! Would it be possible to have the admin bar appear on the admin pages as well??

    I’ll release 2.0.1 right now that has this as an option. Just edit the plugin’s file and uncomment the two hooks.

  46. Great news Viper, I downloaded the new version but can’t find the hooks to uncomment. Where are they?

  47. Forget the last comment, I found it!

  48. HI, I just downloaded the latest version and my issue with added plugins not appearing on the menu has taken an interesting turn, they still does not appear on the menu when on the standard site and appear twice when on an admin page (but only once on the dashboard menu). Is this still an issue with the way both the other plugins are inserting their menus?

    One other thing: can we get an option to add the menu or not in the admin section (or default to on - removing the dashboard one), or else the upgrade path will be problematic if I have to remember anything past a couple of hours ago?

    This is still a cool plugin though :)

  49. Oh, for info I have checked both the plugins I am using (CyStats and podPress) and they are both using the add_menu_page() function correctly:

    add_menu_page('CyStats Statistics Plugin', 'CyStats', 8, __FILE__, 'cystats_admin_index');
    ...
    add_menu_page('podPress', 'podPress', $permission_needed, 'podpress/'.$starting_point.'.php');

  50. Sorry for the comment spamming, but I´ve just tried out the new version (with the hooks uncommented) on three different Wp installs (wp 2.1.5, wp 2.2 and wpmu 1.2) and the admin bar does not show up on the admin pages. There is a white space on top were it should be, but that´s it. On the public pages it works as expected.

  51. Ah ha. You are right, the plugins do not call the admin stuff in the right place. I have passed this on to the authors.

    I think there is still a bug in the menu bar code in that about line 59 of wordpress-admin-bar.php where you include the menu stuff, you should exclude this if you are on an admin page because it has already been called by wordpress and the second call adds everything a second time.

    if(!is_admin()) { // added to exclude being called twice in admin mode
    include( ABSPATH . ‘wp-admin/menu.php’ );
    }

    Thanks

  52. Fixed in 2.0.2. Thanks.

  53. Manne on December 22nd, 2007 at 1:00 PM wrote:

    Fixed in 2.0.2. Thanks.

    Great, when will 2.0.2 be released?

  54. Manne on December 22nd, 2007 at 1:00 PM wrote:

    Great, when will 2.0.2 be released?

    As soon as WordPress.org updates. Seems it’s been having issues lately.

  55. I LOVE this plugin. Unfortunately, when I use it in the admin area, in the write post area, it throws the textarea into disarray. Same with the plugin editor textarea (which I noticed when I recommented those two lines in the plugin). I’m using Firefox 2 on a mac with WP 2.3.2.

    Like I said, LOVE this plugin. Drop down menus for the admin area should be part of the core.

  56. Thanks for a great Plugin! Just one note/bug: It interferes with the Flash Cortex Plugin. Vids won´t show up anymore, when the admin bar is active. Would be really great if this could be fixed, cos until then i fear i have to de-activate the admin bar..

  57. Pretty awesome plugin! One thing, though, you might want to put a stupidly high z-index in the css, like 2000, to make sure that the admin bar opens up over everything else on the page. The Freshy theme, for example, has it’s header image at a z-index of 200 because of the way it handles the custom headers, I believe.

  58. Another issue, which is small since it only affects admins and not surfers, is a Warning on the bottom of the page. I narrowed it down to the admin bar plugin out of all of mine.

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘Array’ was given in /home/citronix/public_html/wp/wp-includes/plugin.php on line 164