Show WordPress Admin Bar Even if Not Logged In
I have been getting into WordPress MU recently, and came across and awesome plugin, the WordPress Admin Bar, that I wanted to utilize for my site. However, one functionality that I wanted to add to it is the ability for it to be viewed on the frontend even when a user was not logged in. Well, I did some hacking, and came up with this. It only works if you have WordPress 2.8 or higher.
Here is my original comment to 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
<li><a href="<?php echo wp_logout_url(); ?>"><?php _e('Log Out'); ?></a></li>
New Line 436
<li><?php wp_loginout(); ?></li>


