ThemeShaper Forums » Thematic

[closed]

header login form like wordpress.com

(6 posts)
  • Started 9 years ago by jamielt
  • Latest reply from angel0628
  • This topic is resolved
  1. Can anyone help me change this to a header login form like the one at wordpress.com?

    <?php
    global $user_ID;
    if(!$user_ID ) :?>
    Welcome, Guest
    <?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'))){ ?>
    
    		<?php wp_register('',' | '); ?><?php wp_loginout(); ?>
    
    <?php } else { ?>
    
    		<a>/wp-admin/"><?php global $user_login;
    
    		get_currentuserinfo();
    
    		echo $user_login;
    
    		?></a> / <?php wp_loginout(); ?>
    
    <?php }?>

    Thanks for your help.

    Jamie

    Posted 9 years ago #
  2. Hey Chris, I still haven't figured this out.

    Posted 9 years ago #
  3. Wanting to put a log in for at the top of header so users aren't redirected to default log in page.

    <!-- top-login --><div id="header-login"><?php
    global $user_ID;
    if(!$user_ID ) :?>
    Welcome, Guest
    <?php else :?>
    Welcome Back, <?php
    global $current_user;
    if ( isset($current_user) ) {
        echo $current_user->user_login;
    }
    ?>
    <?php endif;?>&nbsp;:&nbsp;<?php if (!(current_user_can('level_0'))){ ?>
    
    		<?php wp_register('',' | '); ?><?php wp_loginout(); ?>
    
    <?php } else { ?>
    
    		<a href="<?php echo get_option('home'); ?>/wp-admin/"><?php global $user_login;
    
    		get_currentuserinfo();
    
    		echo $user_login;
    
    		?></a> / <?php wp_loginout(); ?>
    
    <?php }?></div><!-- /top-login -->

    Trying to get something like this:

    <form action="http://wordpress.org/extend/plugins/bb-login.php" method="post" class="login">
    <p><label>Username		<input type="text" value="" maxlength="40" size="13" id="user_login" name="user_login" class="text"/>
      </label>
    	<label>Password		<input type="password" maxlength="40" size="13" id="password" name="password" class="text"/>
    	</label>
    	<input type="hidden" value="" name="re"/>
    	<input type="submit" value="Log in" id="submit" name="Submit" class="button-secondary"/>
    	(<a href="http://wordpress.org/extend/plugins/bb-login.php">forgot?</a>) or <a href="http://wordpress.org/extend/plugins/register.php">Register</a></p>
    </form>
    Posted 9 years ago #
  4. This is what I came up with:

    <?php
    global $user_ID;
    if(!$user_ID ) :?>
    Welcome, Guest
    <?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'))){ ?>
    <h2>Login</h2>
    <form action="<?php echo get_option('home'); ?>/wp-login.php" method="post">
    <label for="user">User Name: </label>
    <input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="20" /> &nbsp; <label for="password">Password: </label>
    <input type="password" name="pwd" id="pwd" size="20" />
    
    <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 { ?>
    <h2>Logout</h2>
    <a href="<?php echo wp_logout_url('$index.php'); ?>">logout</a>
    
    <a href="<?php echo get_option('home'); ?>/wp-admin/">admin</a>
    <?php }?>
    Posted 9 years ago #

  5. Posted 9 years ago #
  6. angel0628
    Member

    how to place my log in form...in the header?
    can somebody please help me...

    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.