Page 1 of 1

Question About How To Redirect To Login Page

PostPosted: December 16th, 2011, 3:07 pm
by boxthehawk
Hello,

Brand new user here but an experienced Wordpress user. I'm testing the free s2Member plugin as an option for a members only website I'm creating. Here are my two questions. Thanks in advance for your help!

1. I have a members only website where members join offline and I do not have a need for a "membership options page" as we do not sign up new members online. Is there a way to have anyone who shows up at the site be redirected to the general login page all the time rather then to the "membership option page"?

2. By not being able to have the "login welcome page" also be the static "home" page for the site I have to have an intermediate page that members are directed to after login and getting to the site homepage. I'd like to have the members directed to the site homepage after login rather then the intermediate page. Is there a way to do this and not run into the conflict of having the "static home page" also be designated the "login welcome page"?

Thanks!

Re: Question About How To Redirect To Login Page

PostPosted: December 19th, 2011, 3:59 am
by Cristián Lávaque
Well, you could protect the whole site with s2Member at Level 0 using the URI restriction set to /. That'll send anyone that isn't logged in, to the Membership Options Page.

If you use a login widget, this will be visible in the sibebar, or have a link to the login page, and instruct the visitor to please login. viewtopic.php?f=36&t=2781

If you have s2Member Pro, you can add its login widget to the post. WP Admin -> s2Member -> API / Scripting -> Pro Login Widget via PHP

To make the user go the homepage after login, you could add the redirect_to value to the login page URL or login form's HTML.

http://yoursite.com/wp-login.php?redirect_to=/

Code: Select all
<input type="hidden" name="redirecto_to" value="/" />


The Pro Login Widget has a setting to say where the user goes after login. viewtopic.php?f=40&t=12453#src_doc_s2member_pro_login_widget%28%29

I hope that helps!