Posted on Apr 08, 2007 - 2:22am by John P. in Wordpress
WP Admin Bar is an indispensable Wordpress plugin which displays links to the Administration Panel at the top of a blog’s page – but only for users who are logged in and have permission to view the given functions.
I find this plugin to be absolutely essential to my enjoyment of Wordpress. It allows me to easily jump back and forth between viewing the blog and various management functions on the back end. If you’ve never used it before you’re going to wonder how you got by without it all this time.
I’ve personally been using the WP Admin Bar from Matt Read since I started using Wordpress. But with the update to Wordpress 2.1 it isn’t functioning properly, Matt hasn’t updated the plugin in almost a year, and his site is currently very broken – so I decided to make the changes myself.
While I was modifying the plugin I made a number of other changes including:
If you are using my Rapid Access theme, you don’t need to do anything other than install and activate the plugin. The theme already has all of the code in it!
Q: Why did you remove the automatic STYLE insertion?
A: Because style rules should always be embedded into your site’s style sheet. There are too many reasons to list. It will only take you a minute to cut and paste them.
Q: Why did you remove support for WP1.5?
A: I don’t have a working copy to test it on, plus you can keep using Matt’s old version.
Q: Why are there different versions for 2.0.x and 2.1.x?
A: Because the WP developers made some slight changes that have to be compensated for.
1.) If you are upgrading from the old WP Admin Bar use the Plugin Manager to disable it. If you do not, there WILL be a problem.
2.) Download, unzip and upload WP Admin Bar Reloaded to your plugins directory. wp-admin-bar-reloaded.zip
3.) Activate the plugin in Wordpress.
4.) Add the following lines to the very end of your “style.css” or “style.php” file.
#wp-admin-bar {margin:0; padding:5px; background:#f9f9f9; border:1px solid #666; clear:both; text-align:center}
#wp-admin-bar ul {margin:0; padding:0}
#wp-admin-bar ul li {list-style-type:none; display:inline; margin:0 10px; padding:0}
5.) Add the following line to your “header.php” file immediately after the “<body>” tag:
<?php if(function_exists('wp_admin_bar')) wp_admin_bar(); ?>
6.) Enjoy!
If you have any problems or find a bug please drop me a comment below.
This plugin is distributed under the Nice Person license as PostcardWare. Please use it, modify it, build commercial Web sites around it, and make the Web a faster, more accessible place. Here is what you could do for me in return:
I’ll publish the really interesting ones, so include a URL!
Pages: [1] 2 3 4 » Show All
[...] WP Admin Bar Reloaded is displays links to the Administration Panel at the top of a blog’s page – but only for users who are logged in and have permission to view the given functions. [...]
[...] Visit and Download [...]
This is the plugin I was waiting for! Thank you! :)
Unfortunatelly it doesn’t work on my site :( I’ve enabled the plugin, copied the 2 section to the header and style files, but the bar didn’t appeared… I use Rounded V2 blue edition 1.0 theme by Ghyslain Armand and WP 2.1.3. Can you please help me? :)
Thanks,
norti
^ Same here. I’m using a custom theme of mine and have exactly followed your instructions but it’s not appearing.
Tried using this with WP 2.1 and the Cutline theme but as the others it’s not displaying.
[...] WP Admin Bar Reloaded Handy toolbar for Wordpress. (tags: Wordpress plugin admin tool toolbar) [...]
Ok guys, sorry about the issue, and the slow response. I was traveling all day today.
I was completely baffled by why this wasn’t working, but finally figured out what I think the problem is… and you’re not going to believe it!
On step 5, the single quotes around wp_admin_bar were, for some reason, copying and pasting as slanted single quotes. These did NOT seem to work. I don’t know how or why that was happening, but I’ve changed them back to normal single quotes so hopefully you can copy and paste it now. If for any reason it isn’t working please make sure that you have normal single quotes in there.
Can someone tell me if that fixed their problem?
John
Thank you, it’s working now! :)
Wicked! ;-)
[...] WP Admin Bar Reloaded (tags: wordpress plugin) [...]
[...] Posted April 11th, 2007 @ 5:56 am by David Paul Robinson This is my favorite new Wordpress Plugin: WP Admin Bar. [...]
[...] Link to plugin (found here among other places). [...]
[...] plugins: wordpress productivity Posted By The wordpress guy on April 11, 2007 I love the part in Mary Poppins where the father of the house is timing himself doing up the buttons on his waistcoat to see if top to bottom was quicker than bottom to top. I think it was Mary Poppins… The point being that saving 20 seconds a few times a day may not seem much, but it adds up over the year. I regularly start typing my blog address to enter the admin side, but my fingers forget and just type the public URL. Don’t we all. This plugin adds links to the head of your blog giving you speedy access to admin functions. Never again will you forget what you were away to do because you forgot the all important /wp-admin. Installation is a bit of a hassle compared to most plugins, but straightforward if you read the guide. Link to plugin (found here among other places). [...]
Hi, cool plugin. I’m using it as a widget with the Samsarin PHP Plugin. Just remember to update the instructions.txt with the fixed quotes. Also, is there a way to display a login and register link when you’re not logged in?
lovely!
it works so well!!!
thank you very very much!!!
paolo
That fixed it! Not sure how I missed the quotes having been like that.
Great plugin, thanks for picking it up and getting it working for us.
[...] I’ve also added the WP Admin Bar Reloaded, this makes it easier for me and other authors (ha!) to access the links in the admin area from regular blog pages, thus eliminating the time it takes to go directly to the admin panel then to write a post. [...]
Gloda,
Thanks for the reminder. I fixed the register.txt doc too now. It was interesting because it seems the problem was with saving the text file in ANSI. When I switched to UTF8 it worked.
Using it as a widget is a good idea. For people who decided to try this you will need to remove the “display:inline;” from the CSS so that it comes out as a regular list instead of a horizontal list.
It would indeed be useful to get it to show the login info instead so you don’t have to also have your Meta plugin. Here is the simplest hack I can think of… let me know if this works for you:
1) Delete the following lines from the PHP file you are using (they’re toward the end):
# Login and logout link.echo "\n\t<li>"; wp_loginout(); echo "</li>";
2) In your Sidebar Widget, immediately after the line that calls the Admin Bar add the following:
<ul><li><?php wp_loginout(); ?></li>
</ul>
I believe that will make the Login/Logout show up either way immediately after the Admin Bar functions. Please let me know if this works. When I get time I’ll work on creating widgetized version for people who prefer it in their sidebar to their header.
John
[...] WP Admin Bar Reloaded despliega enlaces al Panel de Administración en le parte superior de la página de un blog – pero solo a aquellos usuarios que tienen una sesión abierta y tienen permiso para ver determinadas funciones. [...]
The Man,
Thanks for the tip, the only problem was that having two tags messes up the widget look (they appear as two widgets) so I did the following ‘ugly’ hack:
1) Removed this code from the .php
# Login and logout link.
echo “\n\t”; wp_loginout(); echo “”;
2) In the following line, I removed
[Note: I'm no good at php, so I'm not sure whether I could have deleted the entire line.]
3) I removed this line:
echo ”;
4) I put the following into a Samsarin PHP Widget:
So basically I had to get the and tags out of the php in order to allow the wp_loginout to be inside the , but not part of the IF rule in the PHP. It would be nicer though if the plugin, instead of deciding whether or not to load depending on login status, decided *what* to load depending on that information. That way it could all go into the PHP.
I hope this helps, for an example click on my name, you can see the widget in action there, it’s the one called ‘Logbuch’.
Oh, another idea would be to have a link to the registration page which would disappear once you’re logged in.
[...] Mir sin wéi gesot op <a href=”http://mu.wordpress.org”>Wordpress MU</a> gewiesselt. Fir déi wou un den techneschen Detailer interesséiert sin, erklären ech en bëssen wat elo alles um Site benotzt get (dann gesidd der och firwat ech esou lang fir d’Updates brauch). Den Theme, deen d’Ausgesin vum Site bestëmmt, as den <a href=”http://themes.wordpress.net/columns/2-columns/149/connections-reloaded-15/”>Connections Reloaded 1.5</a> deen ech en bëssen verännert hun. Riets an deer Kolonn sin verschidden sougenannt Widgets, zB den <a href=”http://onemansblog.com/2007/04/08/wordpress-plugin-wp-admin-bar-reloaded/”>WP Admin Bar Reloaded</a> deen et méi einfach mecht fir eppes an d’Logbicher ze schreiwen wann een ageloggt as, den <a href=”http://wordpress.org/extend/plugins/kb-countdown-widget/”>KB Countdown Widget</a> deen am Moment weist wéi laang ech schon um Logbuch schaffen, an et wäerten der dann nach e puer dobäi kommen. « Startsäit & Logbicher | [...]
BRILLIANT.
I’ve implemented this on my site and I’ve added this to my Wordpress Plugins and Add-ons page that several people reference.
Thanks Rob. Of course, I can’t take full credit. Matt Read had the original brainstorm. I just added incremental improvements and updates. But I am happy that so many people are finding the updated version as useful as I do.
John
[...] Wordpress Plugin: WP Admin Bar Reloaded>> These icons link to social bookmarking sites where readers can share and discover new web pages. [...]