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!










garrett says:
hello mike,
once logged in, with no redirect upon login, there is an extra li element in ul class=”pagenav”. its always there in the page source. i never would have noticed but i was trying to display the links i added in the admin and the logout link inline and when displayed inline it adds an extra li marker.
played around with it a little bit but its kind of late, any ideas?
thanks very much, nice light and easy plugin.
Comment made on March 3, 2010 at 7:40 am
Daniel de Klerk says:
Hi Mike ,
This is a very nice plugin . I would like to know how to fix a problem or 2 .
1)When you register or login and do something wrong you are redirected to the wp login/register page and from there to the dashboard which is defeating the plugin purpose .
2)Can the LOGIN text on top be removed by any means ? I would like to not have it there .
3)How do I move the text and blocks a bit to the left to fit into my sidebar ? I cannot see anything relevant in the css ?
I am not a fundi but does understand a bit coding etc but sometimes does get blond moments .
Please have a look at my site to see how much the text have to be moved .
Thank you very much
Daniel
Comment made on March 3, 2010 at 10:19 am
Daniel de Klerk says:
Mike ,
Sorry , me again but I forgot something .
How do I add a captcha to this sidebar plugin ? Mine does not work now (si-captcha) but anything else you can suggest that will work here is fine with me . Just need to get automated regs and posts out , or try to at least .
big thanks again .
Daniel
Comment made on March 3, 2010 at 10:26 am
Mike Jolley says:
@Daniel de Klerk: This plugin does not handle registration, only login. There are other plugins to prevent dashboard access. You can only remove the text through css or editing the code. Finally, add extra css styles to your theme’s style.css if you need to make it fit with your theme better.
@garrett: You don’t have any extra line breaks in the admin section textareas do you? Settings > Sidebar login
Comment made on March 3, 2010 at 9:13 pm
Daniel de Klerk says:
Thanks Mike
One more simple q – can the dashboard and profile links be hidden or disabled in any way ? Thanks
Daniel
Comment made on March 4, 2010 at 3:19 pm
David says:
Great plugin.
Having one issue. The option for leaving the “Login redirect URL” field blank in order to leave the user on the current page is giving me fits. If I leave the field blank it always redirects the user to the Dashboard. If I fill the field in with anything else, it redirects to whatever link just fine. But I’d really prefer to leave my users where they are when the login. The logout works just fine. I’ve read through all the comments and all the stuff out at the WordPress.org extend section and can’t seem to find anything that will help. Any info would be appreciated.
Comment made on March 8, 2010 at 9:36 pm
Mike Jolley says:
@David: View page source; whats the form action saying? (its in the form html tag)
Comment made on March 9, 2010 at 7:07 pm
extruendo says:
I have problems with the widget.
the widget makes others disappear
Using WordPress 2.9.1
Comment made on March 10, 2010 at 3:03 pm
Occasio says:
when I add the |true following one of my links the link disappears. I am trying to create a members only link.
Comment made on March 12, 2010 at 9:58 pm
Elias says:
Is it possible to display also the register form in the sidebar?
Comment made on March 23, 2010 at 7:43 am
Subhramani says:
Hi there. Thanks for the brilliant plugin.
I just have one thing to be clarified. The gravatar overlaps with the text links. I was wondering if there was any way to place the gravatar above or below the text links.
Thanks again
Comment made on April 16, 2010 at 6:17 am
Mike Jolley says:
@Subhramani: Youll need to play with the css – perhaps removing the float.
@Elias: Not with this plugin.
Comment made on April 16, 2010 at 1:45 pm
Kim Reichelt says:
Great plugin! But one problem… I’m using this on two sites. On one site, it works perfectly. On the other, I have one problem. Login works great, but when I hit a link (say to go to the dashboard) from the sidebar login, it makes me log in again, even though I am clearly already logged in. Any suggestions?
Comment made on April 19, 2010 at 4:46 pm
Mike Jolley says:
@Kim Reichelt: I cannot tell the problem. Enable debug mode and see if anything comes up relating to sidebar login during loging in etc. Add to wp_config.php:
define('WP_DEBUG',true);Comment made on April 20, 2010 at 12:49 pm
Halim-I says:
Are there any plans to make Sidebar Login work with SImple Facebook Connect plugin? (http://wordpress.org/extend/plugins/simple-facebook-connect/) ?
Comment made on April 26, 2010 at 8:54 pm
Kenny Boris says:
Thanks for the great plugin but there is no space from the left margin for the username and password. Is is a CSS or theme issue?
Comment made on May 12, 2010 at 5:01 pm
Mike Jolley says:
@Halim-I: No plans.
@Kenny Boris: Both? Theme’s CSS probably. You can add new rules; get help with css syntax at w3schools.
Comment made on May 12, 2010 at 6:59 pm
behrouz says:
hi
your plugin is one the best of wordpress plugins
pleas develope this plugin to by your plugin i dont need to wp-login page and it is very nice
i am iranian and thank you for this plugin
Comment made on June 16, 2010 at 8:54 pm
skeith says:
on my blog, the sidebar login shows my avatar (from gravatar). how do I disable the avatar? I’ve tried to disable my gravatar plugin, but nothing work removing the avatar from the sidebar login
Comment made on July 16, 2010 at 7:10 am
Mike Jolley says:
@skeith: Edit the plugin, hide it with css, or wait for the feature to be added.
Comment made on July 16, 2010 at 9:30 pm
Frank says:
Hey,
First of all, nice plugin!
I think I found a small bug though;
In the php file on line 427 stands
$pageURL = get_day_link( $year, $month, $day);But I think it should be
$pageURL = get_day_link( $year, $monthnum, $day);At least php throws a notice error when it is $month
Comment made on July 19, 2010 at 6:44 pm
Ben says:
This plugin works perfectly, except for one issue that I can’t resolve:
When I load a page from my secure server, the style.css file doesn’t redirect from http to https. I’m using the Atahualpa theme, and even when I disable the sidebar for a given page, the stylesheet still loads and I get an “unauthenticated content” warning. Is there a way to force SSL for this file?
Comment made on July 22, 2010 at 5:53 pm
Mark says:
@Mike Jolley:
I think this problem refers to a “Domain Mirror” installed plug in like I use.
If I go to the sidebar login at http://banderanews.pvshopper.com
and log in, then click on the dashboard link, I am forced back to the primary domain http://pvshopper.com thus requiring a login again. I think this should always get the domain based on $server(HTTP_HOST) variable or something like it . This plug in is the only plug in we have this issue with.
How can we modify it to use the $server(HTTP_HOST) of the current domain to pass to the dashboard and profile links? I found some code referencing those links however changing them seemed to have no effect.
Comment made on August 16, 2010 at 10:33 pm
Craig says:
Mike,
Seriously awsome plugin. Thanks for creating it. Situation. I am trying to track when a user logs in by updating a timestamp that I created in the database. I only need to do this one time for every successful loggin. I am having troubles figuring out where to insert code to do this. I thought a good place to insert it was somewhere in the plugin you created. If you agree, could you provide some insight on where I might do that? If this is not a good idea, please let me know. Thanx.
Craig.
Comment made on August 23, 2010 at 4:14 am
Mike Jolley says:
@Craig: I suggest you look to see if there are any wordpress hooks triggered on login – you can add your code there. You’ll need wordpress/php knowledge to do so.
Comment made on August 25, 2010 at 7:51 pm