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!










nCounTr says:
Hi Mike,
I like the side bar very much and i have made some modifications to blend it in my theme. Anyways i haven’t found a way to replace the login button to be blended in my theme.
Also i managed to fully translate it to Macedonian language.
If you can give me pointer how to edit the button it would be awesome.
Thanks,
nCounTr
Comment made on August 4, 2009 at 3:16 pm
Mike Jolley says:
@nCounTr: Try styling #wp-submit with css – you can change text/background colours and add borders etc.
Comment made on August 4, 2009 at 3:19 pm
nCounTr says:
Thanks Mike for the tip. I’ll do that and as soon as i blend it in, i’ll post the macedonian translation here. Thanks again, u rock.
Comment made on August 4, 2009 at 3:21 pm
nCounTr says:
Hey mike i tried with css-ing #wp_submit and it just changed the font color, and i think i need t add/change something in this line:
<input type="submit" name="wp-submit" id="wp-submit" value=" ” />
in the code, but im not an expert in php, and here’s my css settings:
#wp-submit {
color: #ffa20f;
background: #181818;
font-size: 1em;
font-weight: bold;
text-transform: none;
}
Comment made on August 4, 2009 at 3:54 pm
Mike Jolley says:
@nCounTr: The html is fine. Put the css in your theme’s css stylesheet.
Comment made on August 4, 2009 at 3:58 pm
nCounTr says:
I managed to chage it a bit, and now it looks like this:
http://img141.imageshack.us/img141/5143/buttonx.jpg
And I am clueless on how to make it to look like this:
http://img269.imageshack.us/img269/2042/butn.jpg
Comment made on August 4, 2009 at 4:16 pm
Mike Jolley says:
@nCounTr: font-weight: bold and border:0 – look on w3schools if you need more help with css.
Comment made on August 4, 2009 at 6:52 pm
Rachel says:
Love the sidebar login – Im having slight problem though, when logged in my homepage shows me logged out? I can navigate around my site and edit other pages ok until I return to my homepage any ideas?
Comment made on August 5, 2009 at 12:40 am
khalid says:
this language arabic of the plugin sidebar-login.2.2.5
http://www.ar-wp.com/attachment.php?attachmentid=3303&d=1249174158
Comment made on August 5, 2009 at 4:39 am
Mike Jolley says:
@khalid: Thanks
@Rachel: Are you using a cache plugin/WP_CACHE (in config) or anything else which could conflict?
Comment made on August 5, 2009 at 11:37 am
Tim says:
I would like the style of my sidebar login to look EXACTLY the same as your screenshots, please paste your style settings into the comments
Comment made on August 5, 2009 at 9:00 pm
Mike Jolley says:
@MMM: Use the ‘code’ tags if you post code.
@Tim: Use firebug to see my css
Comment made on August 13, 2009 at 1:43 pm
MMM says:
I would like a tag in the sidebar to use.
The “code” tag does not work with tags.
Comment made on August 13, 2009 at 2:07 pm
Mike Jolley says:
@MMM: I just emailed you…
Comment made on August 13, 2009 at 2:08 pm
Rafael says:
Hello all,
If anyone could please help me out with this – I would really appreciate it.
I am trying to edit the plugin a little bit. The problem is that the login boxes (username/password/remember me etc.) are falling out of my sidebar towards the left.
There is enough room for the whole form of the widget to fit in the sidebar, but for some reason, part of it is not it there. It’s like the widget starts a few inches before the beginning of the sidebar and ends somewhere in the middle. If I could just move it a little to the right – it would work.
I tried changing the padding from the stylesheet, but no luck. For some reason no matter what I changed in there, it shouldn’t show. I then realized that the stylesheet was inactive. I tried the “tricks” mentioned in the comments here, but they didn’t work for me.
I changed
.widget_wp_sidebarlogin .avatar_container {
.widget_wp_sidebarlogin .avatar_container img {
to
.avatar_container {
.avatar_container img {
and I copied/pasted the plugins css to my theme’s css. No luck.
Any other ideas?
Thanks in advance!
Comment made on August 17, 2009 at 2:33 pm
Rafael says:
Hello again,
I am still stuck with this. This time, I have linked my blog on my name so that you can take a look.
Can someone please point me towards the right direction? I have had a few coders take a look at it and noone seemed to be able to get this to work. I don’t know much about CSS, but I changed every single number I could see in the stylesheet and I saw absolutely no visible changes. This can’t be right.
Can you think of any reason why this is happening?
Comment made on August 18, 2009 at 12:56 am
Mike Jolley says:
@Rafael: What type of CSS are you trying to apply?
Most problems (usually caused by styles overwriting your own) can be rectified by using !important. I would also recommend using the id ’sidebar-login’. So, for example, you could do this to make labels bold:
#sidebar-login label { font-weight: bold !important; }Hope that helps solve your problem.
Comment made on August 18, 2009 at 1:28 am
Rafael says:
Hello Mike,
Thanks for your reply!
I am trying to make the widget go a little to the right. Thus, I thought that “padding” should do the job – but it doesn’t work.
Furthermore, since I am no CSS wiz, I tried dividing every single number I could find in the plugin’s CSS by 2, hoping that this will make the whole widget half the size (so that it can fit into the sidebar properly), but even then, I failed to see any change.
I then took it a step further, thinking that the widget doesn’t use the stylesheet at all, and I erased it. It turns out that the plugin DOES use it’s own stylesheet after all…
Having said that, I honestly don’t understand what you are telling me to do Mike. You will probably have to be more specific with me since I am what you would call a “noob”
Should I be editing the sidebar-login/style.css even though it says that it’s “inactive”?
If you click on the link anchored in my name, you will understand what I am trying to do. In a few words, I need to push the whole login form a little to the right, so that it fits well within the sidebar. At the moment, it’s a bit out of it towards the left which makes it look bad.
Really appreciate your help!
Comment made on August 18, 2009 at 6:03 am
Rafael says:
Ok – I made it work
What I had to do is add
#sidebar-login p {padding-left: 25px;
}
to my theme’s main CSS.
Now I have a similar, yet different problem lol
Is there any way to decrease the width of the widget – once I am logged in? The login form looks good, but when I log in I see that I am having a similar problem as before, only this time, it’s the gravatar that’s out of the sidebar.
Any ideas based on the above fix?
Comment made on August 18, 2009 at 6:25 am
Mike Jolley says:
@Rafael: You should really use firebug for firefox to inspect whats going on – but you should be able to use something like:
#sidebar-login .avatar { margin-left: 25px !important; }
to get that to line up correctly.
If you need further css styling help there are plenty of tutorials here http://www.w3schools.com/css/default.asp.
Comment made on August 18, 2009 at 9:55 am
JBrinx says:
Hi,
I’ve installed sidebar-login and all works ok, but when I add to the setup the “FORCE_SSL_ADMIN”, the sidebar login keeps showing I´m not authenticated, but if I go to wp-admin and then authenticate and then back to blog I saw my right avatar and links.
Any clue?
Comment made on August 29, 2009 at 9:28 am
Kyoshiro38 says:
Hi,
At the and of the wp_sidebarlogin_current_url function, you should have these lines.
if ( force_ssl_login() || force_ssl_admin() ) {
$pageURL = str_replace( ‘http://’, ‘https://’, get_option(’siteurl’) );
}
Replace whith these ones :
if ( force_ssl_login() || force_ssl_admin() ) {
$pageURL = str_replace( ‘http://’, ‘https://’, $pageURL );
}
It worked for me.
Comment made on September 15, 2009 at 3:45 pm
Julie Stoddard says:
I’ve been wondering if such a plugin as this existed. Thank you for creating it!
Comment made on September 21, 2009 at 3:07 pm
Katrina says:
THANK GOD for people like you – I have been searching all day and trialling numerous similar widgets but this one is the only one that has all the options I need. Thank you thank you thank you!
Comment made on September 23, 2009 at 6:14 am
seven says:
Thanks for your plugin of Sidebar Login, it’s very useful for me, and I’m a Chinese, so I translate the language file to chinese saved name as”"sidebarlogin_zh_CN.po”.Also I changed the style of the login form to suit for my blog style,or my habits:) now it’s running in my blog http://www.anchuang.org/blog.
thanks again
Comment made on October 11, 2009 at 3:37 am