BNS Login
A simple plugin providing a link to the dashboard; and, a method to log in and out of your blog in the footer of the theme. This is ideal for those not wanting to use the meta widget/code links.
Additional WordPress (MU) Multisite compatibility added at version 1.1 – When a user logs out via the plugin they will be returned to the WordPress (MU) Multisite main domain home page.
Download
Latest version: Download BNS Login v2.1.1 [zip]
Installation
- Extract the files from the compressed “zip” file (note the location of the extracted folder/files)
- Upload the contents of the
bns-loginfolder (from above) to the/wp-content/plugins/directory - Activate the plugin through the ‘Plugins’ menu in WordPress
– or -
- Go to ‘Plugins’ menu under your Dashboard
- Click on the ‘Add New’ link
- Search for bns-login
- Install.
- Activate through the ‘Plugins’ menu
Read this article for further assistance: http://wpfirstaid.com/2009/12/plugin-installation/
FAQ
Q. How can I get support for this plugin?
A. Please note, support may be available on the WordPress Support forums; but, it may be faster to visit http://buynowshop.com/plugins/bns-login/ and leave a comment with the issue you are experiencing.
Q. Is it really that simple?
A. Yes, it really is.
Q. Can the plugin be styled?
A. Yes, the plugin text is wrapped in its own <div id="bns-logged-in" class="bns-login"> or <div id="bns-logged-out" class="bns-login"> depending on the login status of the user.
Copy the contents of the included bns-login-style.css file (which contains a framework of the CSS elements generated by the plugin); and paste them into a new stylesheet bns-login-custom-style.css. This file should not get over-written with future updates so your specific CSS will remain.
Q. Can I use the `bns_login` shortcode in a Text widget?
A. Yes you can! Actually this plugin makes it possible to use any properly written shortcode to be used in a Text widget.
Changelog
2.1.1
- Release May 2013
- Correct default redirect URL to point to ‘wp-admin’
2.1
- Released May 2013
- Added plugin version data dynamically to enqueue calls
- Added (enqueued) ‘BNS Login Form Style’ to style the form
- Added
bns_login_form(wp_login_formwrapper) for use as the shortcode output - Updated for version compatibility and minor code formatting
2.0.1
- Released February 2013
- Documentation updates (copyright year, compatibility version)
- Added code block termination comments
- Changed MultiSite conditional to use
is_multisite
2.0
- Released November 2012
- Add empty hooks before and after main output
- Add filter hooks to all of the text output
- Add Shortcode functionality to text widgets
- Add Shortcode for this plugin
- Add wrapping classes around output elements
- Refactored
bns_login_mainto use hooks instead of array elements - Remove
load_textdomainas redundant - Updated ‘readme’ with FAQ on shortcode use
1.9
- Implemented OOP style class coding
1.8.1
- confirmed compatible with WordPress 3.4
- inline documentation and minor code formatting
1.8
- released November 2011
- confirmed compatible with WordPress 3.3
- added phpDoc Style documentation
- added conditional check for custom stylesheet
- cleaned up use of
wp_register - general code tidying
- wrap
BNS_Loginandbns_login_outputinfunction_existsconditionals
1.7
- released June 2011
- confirmed compatible with WordPress version 3.2-RC1
- minor changes to front-facing text
- allow editable parameters for the text
- added editable separator character(s)
- separator character(s) has its own style class,
bns-login-separator - added ‘Register’ link if the site allows for user self-registration; thanks to Andy Fragen for the idea.
1.6
- released June 2011
- confirmed compatible with WordPress version 3.2-beta2-18085
- enqueued the stylesheets
- added the ability to put custom CSS into
bns-login-custom-style.cssthat will not be over-written with updates.
1.5.3
- released December 11, 2010
- Confirm compatible with WordPress 3.1 (beta)
1.5.2
- added ‘clear:both;’ to ‘.bns-login’
1.5.1
- released: 29 Aug 2010
- compatibility check with WordPress 3.0.1
- no other modifications
1.5
- minor code corrections
- code clean up to meet WP Standards
1.4
- compatible with WordPress version 3.0
- added plugin specific style sheet
- centered the text as a default in the style sheet
1.3.3.2
- compatible with WordPress version 2.9.2
- updated license declaration
1.3.3.1
- clarified the plugin release under a GPL license
1.3.3
- compatibility check for 2.9.1 completed
1.3.2
- compatibility check for 2.9 completed
1.3.1
- minor code error correction
1.3
- Code clean up
- Comments and documentation added
- Version control added
- localization code init function
1.2
- Added localization code
1.1
- Added WordPressMU Compatibility – Logout returns user to main domain (home) of WPMU installation.
- Corrected deprecated parameter variable ‘siteurl’ to ‘url’
1.0
- Initial Release

35 Comments
Hi,
I have problems with the Plugins. After I install, I still did not see the login. I can’t find the login in the footer…
@Emily – Hello!
Can you tell me which theme you are using? To the best of my testing the only reason the BNS Login plugin would not work correctly is if the wp_footer() function is not present in your theme.
It has the footer. If not is there other ways? I dun want to use meta, it is wasting my side bar
@Emily – The plugin was made for that reason, so people could choose not to use the “meta” block of links.
I visited your blog, too; and, if you look in the bottom left-hand corner you will see the “Log in here!” link. The plugin appears to be installed and working correctly.
Thanks a lot… I saw it… Finally… At a location I like…
@Emily – That’s Great! I’m glad you like it, too.
[...] plugins offer functionality simply with their activation, for example the BNS Login plugin, other plugins require they are placed in a widget area of the theme. To add a plugin to one [...]
hi there .thanks for plugin, Does anybody know if tis script is compatible with WordPress 2.9 ? Thanks in advance for any help on this! Regards
The plugin is compatible back to WordPress version 2.7 although it is recommended to keep your WordPress installation current to the most recent stable version (as of this writing, version 2.9.2).
Hi Edward,
Is there any way to include the php code to the footer manually (rather than the plugin doing it automatically) – the footer I’m designing contains quite a lot of other information and I wanted to specifically enclose it within div tags so I can position and style it to my heart’s content!
Any help would be appreciated!
Ahhh, don’t worry about it – it’s not what I’m looking for! I was looking for a login form, complete with fields, etc. to place in the footer, not just a link to wp-admin.
that was easy, thanks.
@Andy – Thank you! That was one of the main ideas behind writing and releasing this plugin.
Hi Edward,
Using the Desk Mess theme, and you’re correct. It wasn’t working because the theme didn’t include a call to the wp_footer() hook. I just called it right in footer.php after the existing content (no idea if this is “the right way” or not) and it seems to work now. Hope this helps anyone else with these problems.
- Cody
@Cody – I’m glad you have it working for you. Did you add wp_footer() to the ‘footer.php’ template in the Desk Mess theme; or, did you paste the plugin code into the footer?
Brilliant little plugin. I love the placement and return of space from the sidebar. Any thoughts to putting a link to ‘Register’ if the user is not logged in, if the site supports registration?
@Andy – Thanks! The plugin simply creates an appropriate link to the wp-admin folder which then fires WordPress’ built-in login routine. No reason the register link would not be displayed if the “Anyone can register” option is checked; or, did you have something else in mind?
What I see is, if not logged in, the link to ‘Log in here!’. I know that if I select that then there is the standard link to Register from the login screen. I was just trying to make it more obvious that anyone can register for the site if there were 2 links, as in, ‘Log in here! • Register’.
I just wanted to try and avoid confusion with users who may not be as savvy and realize there is a Register option in the Log in screen. I really hate to make the comparison but selecting ‘Log in here’ to get to the register screen seems a bit like selecting Start to get to Shutdown.
I’m really sorry for the Microsoft analogy.
@Andy – I had a feeling that is where you were going with the idea … I like it. I’ll look into incorporating a “Register” link if registration is available. Thanks.
@Edward – Thanks
@Andy – The latest version of BNS Login should show up in your Administration Panel shortly. There are a great many changes under the hood but the only “default” difference you will see when you upgrade is the added “Register” functionality you suggested. Feel free to have a look at the code and see what you think. I will be writing an “update” post soon to showcase some of the changes to the plugin; and additional feedback is always appreciated. Thanks, again!
Brilliant. Works great. As far as allowing the user to change variables for language and separator, it seems like you’ll need a settings page for that. It does seem like it would add another level of complexity. Personally, unless you get a lot of requests, I’m for keeping things as simple as possible.
@Andy – Thanks. I may have gone a little far with the re-writes as the configurable parameters will need an options page if they are to be implemented more correctly but as you suggested unless there are a lot of requests to add the balance of that functionality …
Hi,
BNS Login:
I have creared a “custom”.css file and replaced the code ( text-align: center;) with text-align: center; color=”black” ) but the “login” does not display in Black. what have I missed? Thanks.
Andrew
@Andrew – The bns-login class text-align property should be able to be used for this, but it could possibly be over-written by your active theme as well. Without more information I cannot say exactly what the issue you are seeing may be.
Hi Edward,
I have tried these changes below but none seem to work.
I must have something wrong but don’t know what.
Can you help, Thanks.
Regards
Andrew
——————————————
.bns-login {
clear: both;
text-align: center; text=”black”; /* Centers the text as a default */
a:link color: #050505; text-decoration: none; a:visited color: #050505; text-decoration: none;
}
div#bns-logged-in {}
div#bns-logged-in a {a:link color: #050505; text-decoration: none; a:visited color: #050505; text-decoration: none;}
div#bns-logged-out {}
div#bns-logged-out a {a:link color: #050505; text-decoration: none; a:visited color: #050505; text-decoration: none;}
/* Last revised June 4, 2011 version 1.6 */
———————————————————–
@Andrew – You use the color property to set text color, i.e.
.css-element { color: black; }But, again, without knowing what your active theme is, I cannot offer any additional suggestions. If you want more help with this issue please provide a link to your site with this plugin activated.
Hi Edward,
apologies, here is the link
http://www.developyoursmallbusiness.com/seethruwatch/
Thanks
@Andrew – I would strongly recommend you use the custom stylesheet recommendation I make within the plugin’s default stylesheet, but given that this should still work to set the text color to black:
div#bns-logged-out a { color: black; text-decoration: none; }Hi Edward,
Added as you suggested:
div#bns-logged-out {color: black; text-decoration: none;}
div#bns-logged-out a {color: black; text-decoration: none;}
It worked perfectly.
Thanks for your help
@Andrew – That’s great! I’m glad you sorted it out … and thanks for choosing the BNS Login plugin, too.
Is there a way to permanently change the term “Log In” to “Website Administrator Log In”
We’ve changed this in the php file but that will be lost with the next upgrade.
@Bob – There are a number of filters you can use to change the various text strings within the plugin. I believe you are looking for the `bns_login_here` filter which is applied to the ‘Log in here!’ text.
@Edward thanks but I have edited the filter in bns-login.php in the past but the changes are replaced with each upgrade.
Should I copy this filter into functions.php or some other file to over ride the plugin.
Can you share the line of code I should add to make the change?
Thanks
@Bob – Unfortunately this is not a simple answer as each method of adding the filter (in the plugin or the theme functions.php template) both run the risk of being over-written with a relative update. If it is a custom theme then using the functions.php template would be the simplest choice but if it is a active theme being updated by its author you should consider a different approach. I would suggest creating a simple plugin to run the filter(s) from as the most future proof method.