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!










Mike Jolley says:
@phil – Im not sure why its happening at the moment so how can i answer… -_-
Comment made on August 29, 2008 at 12:33 pm
Phil says:
Ok fair enough, thanks for the reply. I’ll keep an eye out here for any updates, and search for alternatives in the meantime.
Comment made on August 29, 2008 at 5:50 pm
mick says:
I commented earlier about non-www domains.
I am now trying Sidebar Login version 2.1.1
This version works perfectly with my non-www domain except for one tiny glitch.
For a logged on user the dashboard link has the url “http://domain.com/wp-admin”
This causes the default wp login page to display even though the user is already logged on.
If the dashboard link url was
“http://domain.com/wp-admin/”
or “http://domain.com/wp-admin/index.php”
then the user would go directly to the dashboard as expected.
Thank you for this very useful plugin. (and for the code acknowledgment, I certainly didn’t require or expect that, but it made me feel like my 15 minutes of fame had finally arrived.)
Comment made on August 30, 2008 at 2:00 am
stefan says:
had the same logout problem. but i didn’t use your plugin but as far as i’ve seen it’s pretty much the same. i put on top of my header.php file … and it worked fine for me … maybe this hint can help you
Comment made on August 30, 2008 at 10:00 am
stefan says:
nocache_headers();
Comment made on August 30, 2008 at 10:01 am
Mike Jolley says:
@mick and @stefan thanks for the assistance. Stefan – I looked at that function and was not entirely sure where to put it but I think Ive found the right place; when the ‘logout’ actually takes place before the redirect. Its a bugger to test though because I cannot recreate the logout issue.
Comment made on August 30, 2008 at 6:13 pm
Rob says:
Hey Mike… Just passing by getting the latest update again. Thanks for the 2.6 optimization. Hope all is well..
Rob Gundling
Comment made on August 31, 2008 at 9:26 pm
Rob says:
Mike… I was able to reproduce the Logout error. Not sure if the reasons are the same as anyoneelse here. The plugin that seems to trigger the issue for me in WP 2.6 is WP-PostRatings by Lester ‘GaMerZ’ Chan. Wonder if a variable in his code is the same or screws up something in yours.
If I disable that WP-PostRatings then Sidebar-Login works.
Hope that helps…
Comment made on August 31, 2008 at 10:06 pm
stefan says:
i had to put it on top of of the index.php and the sidebar.php … and it worked fine … but as already mentioned i didn’t use a plugin and instead i simply modified my theme files
Comment made on September 1, 2008 at 8:56 am
Mike Jolley says:
@Rob – What exactly ‘breaks’. I just tried and again my version worked without a hitch.. unless my latest update zapped the bug that is.
Comment made on September 1, 2008 at 12:42 pm
Rashed says:
Thanks a lot.
Comment made on September 10, 2008 at 9:49 pm
Marcelo Cannobbio says:
hi mike.
excellent plugin. thanx for your work.
i have the latest version 2.1.2 running on wordpress 2.6.1.
I had wordpress on beta.mydomain.com and recently move the whole thing to http://www.mydomain.com with success except for sidebar login which is unable to login or logout from the widget.
I can e-mail you with further details.
Does your plugin create any tables in my database?
Do you think it might be something to do with the cookies?
If so, i’m a total newbie at cookies..
any commnet appreciated.
TIA
Comment made on September 11, 2008 at 3:44 am
Missy says:
Ok, so this is a minor hiccup and I am sure I can patch it myself with some digging, but at the moment I am not sure what is causing it….
In Google Chrome and Firefox the log-in widget will not log me in…I am using IE8 (the beta) and it works fine, no idea if it works in IE7. Now I am guessing that this may be a problem on my end as no one has mentioned it above and I figure they can’t all be IE users. I am hoping someone else had a similar issue and can point me the right way. I have changed the code, but only in regards to design and nothing in the CSS so I don’t know why that could cause a conflict in different browsers….anyhow I love the plug-in super useful and if I figure out what goofy mistake I made or if it is a bug…I will post it up.
Comment made on September 16, 2008 at 7:57 pm
Pibzz says:
Hello, great witget, I just installed it to my updated wordpress. I have just one problem… register didn’t show. Do you have any idea why is that ?
Comment made on September 17, 2008 at 10:18 pm
Pibzz says:
I fix it…
Thanks for the widget
Comment made on September 17, 2008 at 10:25 pm
Missy says:
I still cant get the login working on Chrome or FF. IE is ok 7 and 8.
In chrome and FF the traditional login screen (wp-login.php) works. I can login and out using it.
The side-bar login changes to the links (Dashboard, Profile, and Logout) once I log-in using Chrome/FF.
So WordPress via Chrome/FF recognizes I am logged in, but I can not use the logout link. I have to go back to the original log-in screen on wp-login.php to fully logout.
I’m guessing like Marcelo said above it’s a cookie issue and just to be sure its not my system I did purge all cookies and refreshed…
I know next to nothing about cookies, so any help would be appreciated.
Comment made on September 19, 2008 at 6:26 am
Mike Jolley says:
@Marcelo & Missy – Nothing is stored in the database and it does not store any variables through wordpress. In fact, it uses virtually the same login code as wordpress does. I’m wondering whether or not it could be cache related… I guess the only way to tell would be to add a line of code in the sidebar form output that shows the time/date that way you would know if it was being updated or showing a cached version. Other than that..im not sure still. Some people have problems, others do not.
Comment made on September 21, 2008 at 1:53 am
Rob K says:
I am having an issue when logging in using the sidebar login widget. Whenever I log in, I enter an appropriate username and password and click ‘Log In’ at this point the fields clear and it appears as if you are not logged in and must re-enter the information. However, you are actually logged in. If you click on Log In a second time, (even though the fields are blank)it will show the correct Welcome ‘username’ (appearing as it should).
This happens in both Firefox and IE 6.
I am using WordPress 2.6.0 and sidebar login 2.1.2
I have disabled all plugins and still get the same results.
Any help would be appreciated, Thank you.
Comment made on September 23, 2008 at 1:40 am
Missy says:
Ok after reading the comment above, I tried clicking the login button twice as above…
Sure enough the login box changed and showed the correct Welcome ‘username’ (appearing as it should).
This was true in Chrome and FF for me.
So my issue is the same as above.
Comment made on September 23, 2008 at 12:52 pm
Enrique Pascual says:
hello! i used this plugin, wonderfull plugin, i love it!!! but i wan’t change something, is there any way to change de message welcome “username” for welcome “first_name”, i want do this because in my blog the username is the e-mail of the person, so when this message appears my sidebar doesn’t show aligned, i allready try change this but i couldn’t do it, if any one know some thing i appreaciate let me know!!! thanks so much!!! and sorry my english, i speak spanish.
Comment made on September 23, 2008 at 9:49 pm
Michael Hainsworth says:
AH-HAH! I, too, have a problem with “Logout” logging out a visitor but the widget reflecting they’re still logged in (just displaying “Welcome”).
BUT!
Once I disabled the Lester Chan poll plugin, the login worked.
DAMN. Now I have to figure out how to get the two to play nice. Any tips?
Comment made on September 29, 2008 at 2:41 pm
Dusan says:
Hey guys. There is a conflict between sidebar-login and Lester ‘GaMerZ’ Chan plugins (such are wp-postratings, wp-polls etc). I had same problem as other people described, but after disabling wp-postratings – sidebalogin work!
Mike, can this be somehow fixed?
Regards,
Dusan
Comment made on October 10, 2008 at 9:16 pm
Mike says:
hi,
I have it installed on my blog but i added an extra sidebar for use on other pages, how do i duplicate the sidebar.php file for use on the other sidebar ? it works great on the sidebar with my posts but i would like it on the pages sidebar as welll…so all i need is to duplicate it …
Comment made on October 17, 2008 at 12:58 am
Will Taylor says:
I’m having the same issue as #68 above – but this problem persists even with all other plugins disabled. When logging in, a user is actually logged in, but the page does not refresh – the login fields are still there and empty, begging for log in. All is ok if the page is simply refreshed, or if the login button is clicked a 2nd time (even with the fields left empty this 2nd time). Using WP 2.6.2, Mandigo theme.
Comment made on October 17, 2008 at 8:13 am
Will Taylor says:
re#75 directly above -
all is OK using Safari 3.1.2 -
the problem is occurring when using Firefox 3.03.
Comment made on October 17, 2008 at 8:15 am