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™

Can you set login welcome page to the referring page?

s2Member Plugin. A Membership plugin for WordPress®.

Can you set login welcome page to the referring page?

Postby mkrank » July 13th, 2010, 10:33 am

I am in love with the s2Member plugin - really made my life a lot easier. One thing that I'm stuck on:

On the site I'm building, there's a login/logout button on the top right of each page. When a user logs in, I'd really like to just take them right back to the page they were at when they clicked 'login.' I just haven't the foggiest idea what the replacement code might be for that.

Is this possible?
User avatar
mkrank
Registered User
Registered User
 
Posts: 2
Joined: July 13, 2010

Re: Can you set login welcome page to the referring page?

Postby Jason Caldwell » July 14th, 2010, 4:34 pm

Hi there. Thanks for the kudos. Great to hear that.
On the site I'm building, there's a login/logout button on the top right of each page. When a user logs in, I'd really like to just take them right back to the page they were at when they clicked 'login.' I just haven't the foggiest idea what the replacement code might be for that.

Is this possible?

Absolutely. Most WordPress login links and/or forms... are designed to communicate with the /wp-login.php file. The wp-login.php file can also accept a parameter ( redirect_to ).

So you just need to do something like this:
Code: Select all
<a href="http://yoursite.com/wp-login.php?redirect_to=http://yoursite.com/some-specific-page/">Login</a>
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest

cron