PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Login page

s2Member Plugin. A Membership plugin for WordPress®.

Login page

Postby ohadga » September 22nd, 2010, 4:59 pm

Hi,

Registered user that are entering my site:

1. Can i have the login page as part of my home page or must it be a ling that opens wp-login.php in a different page?
2. Can i have the name of my user displayed in my website header (or somewhere else)?

Thanks in advance,
Ohad
http://www.myhobbymaster.com
User avatar
ohadga
Registered User
Registered User
 
Posts: 7
Joined: August 26, 2010

Re: Login page

Postby ohadga » September 25th, 2010, 2:36 pm

Hi,

I'll appriciate any help with this issue, we installed s2member but we don't know how to progress and make the login page as part of our home page.

Thanks again!

Ohad
User avatar
ohadga
Registered User
Registered User
 
Posts: 7
Joined: August 26, 2010

Re: Login page

Postby drbyte » September 25th, 2010, 10:25 pm

the second part of your question....

add this code to where you want the name of the user to be displayed
<?php global $current_user;
get_currentuserinfo();
echo 'Welcome: ' . $current_user->display_name . "\n"; ?>

The first part of your question (login in front page)

You can add the code below to any page you want inside the wp loop

<form name="loginform" id="loginform" action="<?php echo site_url('index.php', 'login_post') ?>" method="post">
<p>
<label><?php _e('Username') ?><br />
<input type="text" name="log" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" tabindex="10" /></label>
</p>
<p>
<label><?php _e('Password') ?><br />
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label>
</p>
<?php do_action('login_form'); ?>
<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90"<?php checked( $rememberme ); ?> /> <?php esc_attr_e('Keep me logged in'); ?></label></p>
<p class="submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Log In'); ?>" tabindex="100" />
<?php if ( $interim_login ) { ?>
<input type="hidden" name="interim-login" value="1" />
<?php } else { ?>
<input type="hidden" name="redirect_to" value="<?php echo esc_attr($redirect_to); ?>" />
<?php } ?>
<input type="hidden" name="testcookie" value="1" />
</p>
</form>

Sam
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: Login page

Postby ohadga » September 26th, 2010, 4:10 pm

Hi,

When i add the second code (didn't try the first yet) i got the attached error.

Am i doing something wrong? Should i simply paste it into the side bar??

Thanks a lot!

Ohad
Attachments
Doc1.doc
(72 KiB) Downloaded 11 times
User avatar
ohadga
Registered User
Registered User
 
Posts: 7
Joined: August 26, 2010

Re: Login page

Postby drbyte » September 26th, 2010, 9:50 pm

make sure you ad it within WP loop...

http://codex.wordpress.org/The_Loop
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

cron