WordPress Sidebar Login 2 – Optimised for wordpress 2.6
At last! My sidebar login widget has evolved into ‘Sidebar Login’ which has both a widget and a template tag to allow you to have a login form in the sidebar of your wordpress powered blog.
It lets users login, and then redirects them back to the page they logged in from rather than the backend, it also shows error messages. Read more for more information and the download link.
Sidebar Login
Sidebar login is self explanatory really; it allows users to login to wordpress from the sidebar! This plugin requires wordpress 2.6 (that is all I have tested) in order to function; this is because wordpress 2.6 has a modified login system to older versions.
Screenshots

Login Form

Logged in
Change Log
You can track changes to the plugin in the wordpress plugin SVN.
Get it now!
You can get the latest version from the wordpress plugin database; Download it here!
Installation Instructions
- Unzip and upload the php file to your wordpress plugin directory
- Activate the plugin
- For a sidebar widget: Goto the design > widgets tab – Drag the widget into a sidebar and save!
- To use the template tag: Add
<?php sidebarlogin(); ?>to your template.
License
WordPress Sidebar Login © Copyright 2008-current. Mike Jolley
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
optimised
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Show your support – ensure continued development
I put a lot of effort into all of my plugins; its thirsty work so why not show your support by buying me a nice coffee
Found this post useful? Why not buy me a coffee!










Aaron says:
Duh! Thanks mike. I was looking at that all wrong.
Comment made on July 7, 2009 at 6:33 pm
WS says:
Mike, I’m having the same problem as David (style.css not being applied). Here is the css path in my header (via ‘View Source’)
Hopefully it helps you track down the problem. Also running WP 2.8.0
Comment made on July 8, 2009 at 3:40 am
WS says:
Odd, I put embedded the output using the ‘code’ tags above and it doesn’t show up… Anyway, here it is in plain text.
Comment made on July 8, 2009 at 3:41 am
WS says:
Sorry for the spam. Must be WP cutting out the code… gah. Let’s try again.
link rel=’stylesheet’ id=’wp_sidebarlogin_css_styles-css’ href=’http://www.szilveszter.ca/blog/wp-content/pluginsstyle.css?ver=abc’ type=’text/css’ media=’all’
Comment made on July 8, 2009 at 3:43 am
Nnyan says:
Been playing with this but I still have the Dashboard link showing up. Mike if I sent you login info would you mind taking a look?
Comment made on July 10, 2009 at 12:47 am
James says:
Just installed the plug-in and everything is working perfectly except for the log-in redirect — it always takes me to the admin page. If I manually set a login redirect that works, but if I leave it blank it doesn’t return me to the current page. I’m using WP 2.8.1 and a custom home page. Have tested different user levels and from different pages. IE 8 and Safari 3.2.2. Any thoughts? Thanks.
Comment made on July 10, 2009 at 8:59 pm
James says:
Okay, figured out where the problem is and a temporary work around. I have a custom static home page defined. Then I have a News page defined as the blog page. WordPress considers your blog page to be the home page (the is_home() test will evaluate to true on my News page, not my custom Home page). As a result, if someone logs in using the sidebar from my News page, the plugin sees that as being the home page and redirects them back to the homepage for the site – which is Home, not News.
My workaround is:
In sidebar-login.php at line 321, split the is_home() || is_front_page() test into two separate items and for is_home() provide a new $pageURL for the redirect. Here’s the code:
if (is_home()){
$pageURL =get_bloginfo('url');
$pageURL .= $_SERVER['REQUEST_URI'];
}
if (is_front_page())
{
$pageURL = get_bloginfo('url');
}
Comment made on July 10, 2009 at 10:29 pm
nnyan says:
For now I just deleted the Dashboard link in the plugin
Comment made on July 11, 2009 at 12:58 am
WS says:
For those that are having a problem with css being applied, I’ve found a fix. Go to the style.css in the plugin directory and change the following:
.widget_wp_sidebarlogin .avatar_container {
.widget_wp_sidebarlogin .avatar_container img {
to
.avatar_container {
.avatar_container img {
Comment made on July 11, 2009 at 7:41 pm
Mike Jolley says:
@James and @WS: thanks.
@nnyan: Giving this another shot now. If I fix it it will be in next update.
Comment made on July 15, 2009 at 3:02 pm
Jon Braeley says:
I too cannot get the the dashboard or an admin link to only show for the admin user. This is an important option for my site where there are only subscribers with no ability to post.
Comment made on July 15, 2009 at 6:31 pm
Mike Jolley says:
@Jon Braeley: I cannot find any issues with it. If it’s a big issue then just remove the dashboard link entirely.
Comment made on July 16, 2009 at 7:30 pm
ronaldo says:
first off love the plugin!
Only got an error after the install, i cant log out or call on the page wp-login.php. Gives a 500 error. Even when i uninstalled and deleted the plugin i still cant log out never had this problem before.
Hope there is a sollution
Comment made on July 16, 2009 at 10:43 pm
Ronaldo says:
Well as easy as i posted this message as easy i found the sollution. Just deleted the wp-login.php and uploaded a new file.
http://codex.wordpress.org/Login_Trouble
Plugin is working great!!!!!
Comment made on July 17, 2009 at 10:43 am
Mike Jolley says:
@Ronaldo: Good to hear. I don’t think sidebar-login did that to your login page.
Comment made on July 17, 2009 at 2:25 pm
Ronaldo says:
No must have been de 2.8 update
Comment made on July 18, 2009 at 2:19 pm
vHv says:
Thanks for plugin.
may you add
- form of the OpenID plugin ?
http://wordpress.org/extend/plugins/openid/
Comment made on July 24, 2009 at 6:28 pm
Melanie says:
I’ve had the plugin for a little while and it was working fine, but lately when I try to log on using it, it just brings me to the WP login page (where I have to login again) instead of the dasbboard. any ideas?
Comment made on July 24, 2009 at 7:41 pm
Mauro Bernal says:
This is the translate to Spanish (Esta es la traducción a Español)
http://rapidshare.com/files/260053060/sblogin-es_ES.mo.rar
Comment made on July 26, 2009 at 1:04 am
zaid says:
I want to reduce the size of the test areas where you fill in your username and password. How do i do that?
Comment made on July 27, 2009 at 1:05 pm
Mike Jolley says:
@zaid: Using CSS
Comment made on July 27, 2009 at 7:35 pm
Mike Jolley says:
@vHv: Implemented for next version.
Comment made on July 27, 2009 at 8:45 pm
zaid says:
@Mike
I understand that i need to change the code in the style.css. But what specifically do i need to do?
I apologise in advance, but in have the barest understanding of coding.
Comment made on July 28, 2009 at 3:22 pm
Mike Jolley says:
@zaid: Something like:
.widget_wp_sidebarlogin .mid { width: 200px; }Comment made on July 28, 2009 at 5:36 pm
zaid says:
@mike
Messed around with firebug. Solution was in sidebar-login.php.
Needed to put this bit of code [style="width: 132px"] after this bit [type="text"] and this bit [type=”password”.
Thanks for your help.
Comment made on July 29, 2009 at 9:20 am