header registration form with redirect to profile

Hi WPMU DEV

I'm working on trying to get a login form into my buddypress site with the Studio theme header as I've had a lot of feedback from members that they can't find where to login, or find the drop down login panel confusing. (my site is marketingcompass.co.uk)

The main issue is trying to get it to fit into the header without pushing the custom logo down too far. I can't find where to extend the header section within this theme, or else that might work...

The other challenge with the code below that I've found is that I want to redirect the user to their profile once logged in and make sure that if they are logged in then there is a clear button to log out again.

Cn anyone help me clean this code up a bit?

<div align="right">
<?php
get_currentuserinfo() ;
global $user_level;
if ($user_level> 0) { wp_loginout(); } else { ?>
 
<form name="loginform" id="loginform" action="wp-login.php" method="post">
        <input type="text" name="log" id="user_login" class="text input" value="<?php echo attribute_escape(stripslashes($user_login)); ?>" size="20" tabindex="10" />
        <input type="password" name="pwd" id="user_pass" class="text input" value="" size="20" tabindex="20" /><?php do_action('login_form'); ?>
    <input name="rememberme" type="hidden" id="rememberme" value="forever" tabindex="90" />
        <input type="submit" name="wp-submit" id="wp-submit" class="submit" value="<?php _e('Login'); ?> »" tabindex="100" />
</form>
<?php } ?>
</div>

  • aecnu

    Greetings themarketingcompass :slight_smile:

    After looking at your site I see exactly what you are talking about with the main menu and lack of space to add the Login to include Small business marketing tips & ideas being somewhat squished in along the left side.

    Though the cure to this certainly falls into the realm of customization which is beyond the scope of this forum, I still want to offer assistance in any way that I can.

    I would suggest rather then trying to squish in the login into this same line would it not be more aesthetic to move the Small business marketing tips & ideas down one notch which should move the entire menu left and offer plenty of room for your Login menu selection?

    Joe :slight_smile:

  • themarketingcompass

    Thanks Joe. I've played around with trying to fit it into the second tier of the header by pushing the title tag down and it doesn't look quite right.Another option would be to place it about the main nav bar items. I don't seem to be able to add it there without the 'hello' and 'our community' drop down panel being also moved down a line, therefore it just floats within the second tier!

    When you login via the theme's login panel, I've installed a plugin that redirects the user to their profile page, the code below doesn't seem to implement this feature, which again make it confusing for the user, as the only way to get to the community part of the site is via the 'our community' panel and clicking on the links 'activity', 'members', 'groups', 'forums'. Having to work this out is again confusing for the user and ultimately they might as well login via the panel in the forst place, rendering the new login fields a bit pointless really! How would you action this command with the code below?

    <div align="right">
    <?php
    get_currentuserinfo() ;
    global $user_level;
    if ($user_level> 0) { wp_loginout(); } else { ?>
     
    <form name="loginform" id="loginform" action="wp-login.php" method="post">
            <FONT COLOR=#213365>Login <input type="text" name="log" id="user_login" class="text input" value="<?php echo attribute_escape(stripslashes($user_login)); ?>" size="20" tabindex="10" />
           Password <input type="password" name="pwd" id="user_pass" class="text input" value="" size="20" tabindex="20" /><?php do_action('login_form'); ?></FONT COLOR=#213365>
        <input name="rememberme" type="hidden" id="rememberme" value="forever" tabindex="90" />
            <input type="submit" name="wp-submit" id="wp-submit" class="submit" value="<?php _e('Login'); ?> »" tabindex="100" />
    </form>
    <?php } ?>
    </div>

  • aecnu

    Greetings themarketingcompass :slight_smile:

    after considerable thought, checking the code, finding whats seems to be when I think of a fix - something else breaks - plus you and I were tackling this in the perspective of moving things around forms etc.

    Why not just stick a Login Widget tactfully on the page instead?

    This will keep the pleasant tone of your current site layout, not crowd the header any further, and offer your clients a pleasant and expected login configuration.

    Your thoughts sir?

    Joe :slight_smile:

  • aecnu

    Greetings themarketingcompass :slight_smile:

    Once again with careful consideration to include scouring through the theme code etc. trying to search for the string, or using PHP to change one piece of text, I think this may do the trick for us Real-Time Find and Replace

    which appears that not only will it be efficient but save us a whole lot of trying to hunt down the specific coding.

    Your thoughts sir?

    Joe :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.