how to add login /pass word on home page ?
-
how to add login /password on home page ? I see them in other pages like activity, groups, forums etc, but not on home page.
Viewing 3 replies - 1 through 3 (of 3 total)
-
http://www.wprecipes.com/add-a-login-form-on-your-wordpress-theme
Hope that helps!Or… just add the “meta” widget, thats easier.
(couldn’t edit my post above, sry.)I used the below code and works, only problem is it not compatible with W3 total cache. Even though I logged out, home page still shows as logged in, other pages shows as logged out. Any idea how to make it work as needed ?
<?php if ( !is_user_logged_in() ) : ?> <form name="login-form" id="login-form" action="<?php echo site_url( 'wp-login.php' ) ?>" method="post"> <input type="text" name="log" id="user_login" value="<?php echo attribute_escape(stripslashes($user_login)); ?><?php _e( 'Username', 'buddypress' ) ?>" onfocus="if (this.value == '<?php _e( 'Username', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Username', 'buddypress' ) ?>';}" /> <input type="password" name="pwd" id="user_pass" class="input" value="" /> <input type="checkbox" name="rememberme" id="rememberme" value="forever" title="<?php _e( 'Remember Me', 'buddypress' ) ?>" /> <input type="submit" name="wp-submit" id="wp-submit" value="<?php _e( 'Log In', 'buddypress' ) ?>"/> <input type="button" name="register" id="register" value="<?php _e( 'Register', 'buddypress' ) ?>" onclick="location.href='<?php echo bp_signup_page() ?>'" /> <input type="hidden" name="redirect_to" value="<?php echo bp_root_domain() ?>" /> <input type="hidden" name="testcookie" value="1" /> <?php do_action( 'bp_login_bar_logged_out' ) ?> </form> <?php else : ?> <div id="logout-link"> <?php bp_loggedinuser_link() ?> / <?php bp_log_out_link() ?> </div> <?php do_action( 'bp_login_bar_logged_in' ) ?> <?php endif; ?>
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘how to add login /pass word on home page ?’ is closed to new replies.