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 then redirected to previous page

s2Member Plugin. A Membership plugin for WordPress®.

Login then redirected to previous page

Postby hazardous_waster » August 2nd, 2011, 7:45 am

Hello Peeps

You've helped me no end a few times before so thank you all for that but I've got another question, here's hoping you can help me again.

Here's my little project if you want to take a look ... http://intelligent-investment.notknowndesigns.co.uk/

Should be a fairly simple request but I can't find any one talking about it or any information on the forums so here I am, Once you login to the site my client wants to redirect the user to the page they where just on, so for example if I click on the 'about' page, then click the login button near the bottom of the page, I want to be taken to the login page, fill in my details (try username - test, password - test if you wanna give it a go) his the enter button and then be taken back to the 'about' page and NOT the 'welcome cheers for loging in' page.

Any ideas?

Cheers in advance, Neil.
User avatar
hazardous_waster
Registered User
Registered User
 
Posts: 12
Joined: May 19, 2011

Re: Login then redirected to previous page

Postby Cristián Lávaque » August 2nd, 2011, 11:17 pm

Hi Neil.

You can use the s2Member Pro Login Widget if you have it, it's got a setting that will let you take the person back to the page he's logging in from.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Login then redirected to previous page

Postby hazardous_waster » August 18th, 2011, 12:51 pm

I've just got the pro version so that I can do this ... can't find the option, how do I do this?

N
User avatar
hazardous_waster
Registered User
Registered User
 
Posts: 12
Joined: May 19, 2011

Re: Login then redirected to previous page

Postby Cristián Lávaque » August 18th, 2011, 3:13 pm

WP Admin -> Appearance -> Widgets -> s2Member Pro Login Widget -> Redirection After Login -> Previous Page

:)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Login then redirected to previous page

Postby hazardous_waster » August 18th, 2011, 5:41 pm

I dont think this is what I'm after ... let me show you what I have so far ...

http://www.intelligent-investment.co.uk

so what Im after is say you go to the 'about' page, then hit login from any of the links on that page in the header or in the footer, then your taken to the login page, once you login then your redirrected back to the about page .. this seems to add a login widget to the about page, not what I am after at all, does that make sense, is it possible?

N
User avatar
hazardous_waster
Registered User
Registered User
 
Posts: 12
Joined: May 19, 2011

Re: Login then redirected to previous page

Postby Cristián Lávaque » August 19th, 2011, 1:17 am

I see. Well, the widget is a widget.

You could edit the login links in the theme's templates. This may help: https://codex.wordpress.org/Function_Re ... _login_url

Code: Select all
<a href="<?php echo wp_login_url(get_permalink()); ?>">Login</a>
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 0 guests

cron