WordPress Admin Bar

Note of Plugin Discontinuation:

WordPress 3.1 features a built-in admin bar like this, so I will no longer continue development of this plugin. I recommend uninstalling this plugin as it will no longer be maintained.

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:

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).

532 thoughts on “WordPress Admin Bar

  1. I’m using this plugin along with WPtouch to show a mobile version of my site. When viewed in the mobile version, the admin bar wraps onto three lines and overlaps other content.

    So far, the solution I’ve come up with is to create a ‘wpabar_show’ filter that is used by WPtouch to hide the admin bar when the site is in mobile mode.

    In WordPress Admin Bar, I’ve changed the end of InitializationPart2() to:

    // Register the hooks to display the admin bar
      if ( 1 == apply_filters( ‘wpabar_show’, $this->settings[‘show_site’] ) ) {

      add_action( ‘wp_head’, array(&$this, ‘OutputCSS’) );

      add_action( ‘wp_footer’, array(&$this, ‘OutputMenuBar’) );

      }

      if ( 1 == apply_filters( ‘wpabar_show’, $this->settings[‘show_admin’] ) ) {

      add_action( ‘admin_head’, array(&$this, ‘OutputCSS’) );

      add_action( ‘admin_footer’, array(&$this, ‘OutputMenuBar’) );

      }

    Then in WPtouch I add
    add_filter( ‘wpabar_show’, array(&$this, ‘filter_wpbar_show’) );
    to the WPtouchPlugin constructor, and define the filter_wpbar_show method as:
    function filter_wpbar_show($show) {
      if ($this->applemobile && $this->desired_view == ‘mobile’) {
      return 0;
      }
      return $show;
      }

  2. Quick hack to make the default WordPress admin bar hide when this is enabled.

    In wordpress-admin-bar.php, starting at line 369:

    if ( is_admin() ) {
    echo ' <style type="text/css">#wpabarlist ul { margin: 5px 0 0 25px; } ' . "n";
    echo ' #adminmenu { display:none; }' . "n";
    echo ' #wpbody, div.folded #wpbody { margin-left:0px; }' . "n";
    echo ' #wpbody-content .wrap { margin-left:15px; }' . "n";
    echo ' #media-upload-header #sidemenu li { display:auto; }' . "n";
    echo ' </style>' . "n";
    }

  3. Hi, I just upgradet my blog to the brand new WordPress version 2.8. Unfortunately, WP Admin Bar now causes an error at the bottom of each page:

    Warning: Invalid argument supplied for foreach() in /…/…/../../…./…../zonebattler/wp-admin/menu.php on line 38

    Disabling WP Admin Bar is a temporary workaround to get rid of the bold error message, but who can live without your great plugin?! πŸ˜‰

    I’d be very happy if you cold fix that issue in the forseable future… Thanks!

    Greetings from Germany,
    Ralph

  4. Love this plugin!! think it’s fantastic. One two things i would say.

    1. 2.8 as has been mentioned breaks stuff. It has an error and also shows blank checkboxes with nothing next to them.

    As a feature, i’ve been using wordpress as a CMS and using your bar to do so. However i need to keep adjusting the CSS file within it to disable to menu on the left hand side.

    Code i use within the CSS:
    #adminmenu {
    display: none;
    }

    #wpbody {
    margin-left: 5px;
    }

    Except i need to keep updating it. Any chance that you could look at including this as part of the plugin for future releases or an option for the plugin?

  5. True however you’ll find there are clients who will be confused by having multiple menus which is the point to making it disappear.

    It’s less about being for our benefit but more for them.

  6. Hi Guys, I am sorry for bothering, but I have read almost all the comments and I did not see anyone having such problem. I have installed a brand new 2.7 version of WordPress, for tests on upgrading to 2.8 before to do so on my productive servers, and after installing your toolbar, the browser gets the following message 2-3 seconds after I log in to the administration control panel:

    Connection Interrupted

    The document contains no data.

    The network link was interrupted while negotiating a connection. Please try again.

    I have notticed that if I click on any link in the admin area, it works smoothly, but if I just log in and don’t click anywhere, it kicks me out with the upper error.

    Currently I have tried to use FF 3.11 and IE 6.0 and with both I have the same weird problem.

    Any ideas how to fix that? (forgot to mention that no other plugins are installed nor the toolbar script is modified by me). Just a fresh 2.7 + upgrade to 2.8 and toolbar (latest version)

  7. Pingback: komfortabel navigieren in Wordpress- netztreiben

  8. Hi
    Fantastic Plugin! THANK YOU.

    There is a bug with ALL those Plugins that add a new Custom Top Level Menu PLUS a number of sub-menu Items under it.

    Example Plugins are listed below. The bug ALWAYS manifests in WP-Admin Bar but NEVER in the regular Admin menu.

    The bug is that the FIRST SUBMENU item under the new CUSTOM TOP LEVEL MENU always generates a Page Not Found error.

    As you know, usually, the First Submenu Item points to the same page/panel as the new custom Top Level Menu.

    These Plugins are just a few examples that will enable you to reproduce the bug. But all Plugins produce the same problem, regardless of programmer-specific quirks in the way add_menu and add_submenu are used.

    Project Manager: wordpress.org/extend/plugins/projectmanager/
    wordpress.org/extend/plugins/accessqontrol/
    wordpress.org/extend/plugins/statpress/
    Wp-Custom wordpress.org/extend/plugins/wp-custom/
    TDO MiniForms wordpress.org/extend/plugins/tdo-mini-forms/

    All those add a Top Level menu with submenu items. Click on the first sublevel item in WP Admin Bar and you will get th epage not found error. Click on the same link in th emain menu and you will go to the page/panel.

    I tried to correct your code but am not experienced enough.
    It is such a vital plugin that I thought you would want to know.
    Many thanks.

  9. Great plugin!

    One thing I was wondering, would it be possible to embed the menu inside other div’s? Reason I want to know is that I would like the bar to be in the actual page part of my theme, not on the very top. I glanced at the code, but it looked like it wasn’t possible, maybe I’m wrong though, since I am not the best at HTML, though I am learning quickly.

    If I could put that below the toolbar on my site, then that would be perfect! I could probably do the rest of the customizations on my own if I just knew how to get it below my toolbar.

    Thanks for the great plugin!
    Alex

  10. Holy crap. Just came across this plugin (realized I had two of your plugins installed- though disabled- and wanted to see what else you had)

    Trying it out now, it’s awesome. Thanks!

  11. in wordpress.com the bar are change
    this have the search and login form
    i want these options in the admin bar

  12. Cool plugin!
    Anyway, how can i do the same panel, but without all these admin’s options? I would like to do the same panel, but put some fields like username (field fro login and password) and link to tdo mini forms page on my site.

  13. brainsolid on August 7th, 2009 at 9:55 AM wrote:

    Cool plugin!
    Anyway, how can i do the same panel, but without all these admin’s options? I would like to do the same panel, but put some fields like username (field fro login and password) and link to tdo mini forms page on my site.

    Sorry, I don’t provide support for modding my plugin, especially to such an advanced degree. You’re on your own. πŸ™‚

  14. Pingback: Yararland???m WordPress Eklentileri » mujdatkorkmaz.com: blog

  15. i have deleted your plugin of my site
    now i using WS Tool Bar
    this have the login box
    and this are more beast of the your’s

  16. Pingback: Genial Front-end-Editor « js9600.dk

  17. Hi! Months ago, I already reported the issue that when viewed with the Opera Browser (v9.64), the little dropdown menu arrow of the “Plugins” item in WP Admin Bar seems to be trunctated (cut in half). I just noticed that this is NOT the case when plugin updates are announced and awaiting the user’s attention: “Plugins (1)” for instance does NOT affect the arrow to the right, only “Plugins” does. Perhaps this may be hinting to a little bug that may be fixed somehow? I can provide a screenshot if you’d care to send me a mail so that I can answer… Thanks!

  18. I’m loving this awesome plugin, Thanks big time!

    I’d like to insert a graphic link that will display to all visitors, just a simple linked to another website. I’m not a programmer but I’m usually pretty good at copy/paste hacking, but this one has be baffled. Ideally, the link would appear in the middle, or just after the Comments link. Where can I insert the code so this will work?

    Thanks
    Ted

  19. Silly me, I realized it’s only for logged in users a couple hours after posting my question, and I was confusing it with the standard wpmu toolbar. Sorry if I offended, asking about hacking your code, as that wasn’t my intention. Just trying to make things work the way I need it. But I respect your wishes and appreciate your generous contribution to the WordPress community.

    Peace! =)

  20. I can only use it in admin not on the site, i deactivated all my plugins cause i thought might be a problem there but no luck… any idea?

    thanx in advance! Really nice work keep up! πŸ™‚

  21. I fixed it just added the SPECIAL line πŸ˜› on my footer.php πŸ™‚ Thanx really cool plugin used something like it on drupal πŸ™‚

  22. Pingback: 20 plugins indispensables pour Wordpress | Tendances du Web

  23. Viper,

    Great plugin! I love it. I too, like many here, want to be able to show it even if the person is logged in or not, and give them the option to log in if they want to. Well, since WordPress 2.8, this is now possible by editing 1 line in your code and commenting out another.

    For those of you who want to have it show whether the person is logged out, just comment out line 49 (the one that says if ( !current_user_can(‘read’) ) return;) and then edit line 436.

    Old Line 436 – <a href="”>
    New Line 436 –

  24. Obviously, you can’t paste code into your comments. It does not get saved properly. πŸ˜› Oh Well.

    Follow the link below for a write up on how to edit the wordpress-admin-bar.php file to show even if users are not logged in and give them a log in link if they are not, and a log out link if they are.

    http://mactimize.com/?p=259

  25. Pingback: Show WordPress Admin Bar Even if Not Logged In | Mactimize

  26. Aha! That makes sense.
    Sorry if the link didn’t work for you earlier, I hadn’t finished writing up the post before I posted the link. πŸ˜›

    For those of you who don’t want to go to my site, here’s the code again.

    Old Line 436 –

    <li><a href="<?php echo wp_logout_url(); ?>"><?php _e('Log Out'); ?></a></li>

    New Line 436 –

    <li><?php wp_loginout(); ?></li>
  27. Pingback: { p i n k d e s i g n } » Blog Archive » WordPress Admin Bar ????wp????

  28. Viper006Bond – I want to thank you for making your plugin GPL – it’s great. With that said, I have modified and re-released your plugin to display even if the user is not logged in and to include a Log In Form if the person is not logged in.

    You can check it out and download it at that link below. I am waiting for it to be approved for WordPress.org’s plugin directory.

    http://mactimize.com/?p=263

  29. Donald: Bah, I really wish you had picked a better fork name. What happens if I stop being lazy and implement that feature as well as more features that your fork doesn’t have? Then the titles will be confusing as heck. πŸ˜‰

    I also haven’t said I don’t want to support the bar showing up when you’re not logged in, I’ve just been incredibly busy with work and such. I don’t think it’s a bad idea at all to have the option to make it always show up.

    What I am however not really interested in coding myself is making the admin bar show up across all blogs on a WPMU install. Your plugin will show the logged in version on a blog you own and the logged out version on a blog you don’t own (ideally it should show logged in across all WPMU blogs).

    I accept patches for my plugins — no need to fork. πŸ˜‰

Comments are closed.