Sometimes I just want to make the registration and login process a little easier to access.  Well, not just easier to access because you can use the Meta widget to put login and registration links on your web site.  The thing is, when you use the Meta widget you are directed to a separate login or logout page, away from the page that the visitor was on.  Sometimes this is OK, but other times it is very disruptive to the flow the visitor was following.  So I would like the process to be easier to access and less disruptive to the visitor.

So, being the explorer that I am, I started poking around to see what WordPress plugins are available that might help this situation.  I found several, but one that seems to work quite well is registration-login by Md. Jamal Hossain Khan.  This plugin provides a pretty non-intrusive tag bar at the top of the window that provides registration, login, or other function depending on the user.  What I like about this approach is that it is very unobtrusive.  And it also works on pages and posts that are full page (no sidebars or widgets).  The downside is also that it is very unobtrusive and sometimes visitors won’t even notice it.

But first, let’s talk about the installation of the plugin. Most of the time plugins are a pretty simple install.  You perform the standard WordPress install, activate the plugin, and perform any of its setup – viola!  You have magical new functionality.

imageAlas, such is not the case with the registration-login widget.  But don’t be dissuaded because the installation isn’t that tough.  You just have to use a little reasoning when you go through the installation process. First of all, go through the standard WordPress installation and activation.  Then what?  You’ll quickly notice that there is no setup panel, no separate Admin menu, nothing on your screen looks different… nothing.  The trick to this plugin is that it doesn’t behave like the majority of other plugins out there.  You actually have to go into your theme php files and make a change.  Frankly, I don’t know why the plugin couldn’t be designed like many other plugins and just plugin to your site, but it wasn’t.  Most likely there is a reason the the Nerdman just hasn’t taken the time to understand.

But the php change that you have to implement is pretty minor.  First, from your Admin panel go to the Appearance section, and within that section go to the editor.  Once in the editor section make sure that you are set to edit the files from your current theme (in my case it is Flexsqueeze) and select the header.php file.  Makes sense because where we want the registration tab to appear is a the top of the page, which is really the top of the header.

Within the header.php file you will find the <body …> tag, which should follow the </head> tag.  What you want to do is insert the following line right after the <body> tag.  Reload your site page and you should see a couple of nice registration and login tabs at the top right of the screen.

<?php if(function_exists(print_form)) print_form(); ?>

Works pretty slick and it is really unobtrusive.  And what’s cool about loading it right after imagethe <body> tag is that these tabs float at the right side of the window and will reposition if the window is resized.  In fact on the first site I put this widget on it worked perfectly, partially because of the transparent header at Sash Photography.

But then I moved onto another site and installed it in the same manner.  This site had a solid header and I was hoping that the login tabs would float over the top of this site’s solid banner… nope, not going to happen.  Bummer. What happen is that the login tabs floated at the right edge of the window, but when the window was re-sized smaller, the login tabs slid underneath the header graphic and were hidden.

A little playing around and a little intuitive deduction brought the solution to the forefront.  I found that if I experimented with the location of the registration-login php line of code I could alter where the login tabs would appear.  It took a little bit of experimenting to find the exact right place to put the php line, but logically I knew it had to come somewhere near the end of imagethe header routines.  What I found is that if I put it right after the bp_after_header_nav line then I would get the login tabs to appear on top of the header graphic.  Although I haven’t tried it, my guess is that this is very theme dependent and that whatever header.php file you have, you will need to experiment with the placement for the additional php code.

Tagged with:

Filed under: Wordpress ConfigurationWordpress FavoritesWordpress Plugins

Like this post? Subscribe to my RSS feed and get loads more!