Login at the top right of the page
#1
Posted 02 March 2012 - 04:20 PM
#2
Posted 02 March 2012 - 04:51 PM
#3
Posted 02 March 2012 - 05:23 PM
Are you creating some kind of membership site that requires users to register so that they can log in and access certain content on your site?
Yes, exactly :-)
Let me know if you think I will need additional plugins to accomplish this.
Kind of a novice here, haha.
#4
Posted 02 March 2012 - 05:29 PM
#5
Posted 02 March 2012 - 05:42 PM
#6
Posted 02 March 2012 - 05:53 PM
#7
Posted 02 March 2012 - 11:48 PM
How would I set up these values to be on the main page as I described in my first post?
Maybe just:
Login: [_________] Password: [_________] Register?
Retrieve my password
"Register" can link to a different page...
Do you think I can just chop up the current login.php, stick it as a div in the header, and then style it?
#8
Posted 03 March 2012 - 04:25 PM
#9
Posted 04 March 2012 - 08:35 PM
#10
Posted 04 March 2012 - 11:14 PM
#11
Posted 04 March 2012 - 11:29 PM
// add_action('hook_name','function name');
add_action('pagelines_after_branding_wrap', 'header_login');
// function name
function header_login(){
?>
<!-- top-login --><div id="header-login" style="float: right; margin-top: -80px; background-color:rgba(255,255,255,.75); padding:7px;">
<?php
global $user_ID;
if(!$user_ID ) :?>
Login Below
<?php else :?>
Welcome Back, <?php
global $current_user;
if ( isset($current_user) ) {
echo $current_user->user_login;
}
?>
<?php endif;?>:<?php if (!(current_user_can('level_0'))){ ?>
<form action="<?php echo get_option('home'); ?>/wp-login.php" method="post">
<input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="10" placeholder="username" />
<input type="password" name="pwd" id="pwd" size="10" placeholder="password" />
<input type="submit" name="submit" value="Login" class="button" />
<label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
</form>
<a href="<?php echo get_option('home'); ?>/wp-register.php?action=register">Register</a> | <a href="<?php echo get_option('home'); ?>/wp-login.php?action=lostpassword">Recover password</a>
<?php } else { ?>
Logout
<a href="<?php echo wp_logout_url('$index.php'); ?>">logout</a>
<a href="<?php echo get_option('home'); ?>/wp-admin/">admin</a>
<?php }?>
</div><!-- /top-login -->
<?php }
// end function
#12
Posted 05 March 2012 - 04:45 PM
position: relative;
To the header-login div
#13
Posted 05 March 2012 - 05:58 PM
#14
Posted 05 March 2012 - 06:28 PM
#15
Posted 05 March 2012 - 09:38 PM
#16
Posted 21 July 2012 - 08:52 PM










