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™

Add Login / Logout to top navigation.

s2Member Plugin. A Membership plugin for WordPress®.

Add Login / Logout to top navigation.

Postby urbanryno » February 8th, 2011, 12:27 am

I'm just looking for a simple script to add to my header file that adds the text "Login" if they are not currently logged in or "Logout" once they are logged in. Seems simple. I just cant figure it out. Ug.

Thanks for the help.
User avatar
urbanryno
Registered User
Registered User
 
Posts: 11
Joined: February 8, 2011

Re: Add Login / Logout to top navigation.

Postby camillemm » February 8th, 2011, 6:04 am

Search in Google for "login form wordpress".
User avatar
camillemm
Registered User
Registered User
 
Posts: 86
Joined: September 7, 2010

Re: Add Login / Logout to top navigation.

Postby nhsatomom » February 8th, 2011, 2:58 pm

This is what I use:

Code: Select all
<?php if(is_user_logged_in()){ ?>
<a href="<?php echo S2MEMBER_LOGIN_WELCOME_PAGE_URL; ?>">Member Home</a>
| <a href="<?php echo S2MEMBER_LOGOUT_PAGE_URL; ?>">Logout</a>
<?php } ?>
<?php if(!is_user_logged_in()){ ?>
<a href="http://domain.com/commons/wp-login.php">Login</a>
<?php } ?>

It adds an extra link after they've logged in ("member home"), so strip that out if you don't want that feature.
User avatar
nhsatomom
Registered User
Registered User
 
Posts: 25
Joined: February 1, 2011

Re: Add Login / Logout to top navigation.

Postby urbanryno » February 8th, 2011, 6:48 pm

I LOVE YOU !!!! That's what i needed.
thanks.
User avatar
urbanryno
Registered User
Registered User
 
Posts: 11
Joined: February 8, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 3 guests

cron