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™

Trouble configuring login and member options pages

s2Member Plugin. A Membership plugin for WordPress®.

Trouble configuring login and member options pages

Postby jb510 » June 23rd, 2011, 4:39 am

I'm using s2member to protect a single parent page called "Gallery" and a dozen child pages. Visitors can NOT register, they all use the same login called "guest" to access the private area (hi-res image galleries for potential clients only). So just to be clear, no registration, no payment, just fancy password protection.

So.. I created a page called "Login" which is nothing but a standard page with a shortcode the calls the sidebar login plugin's template tag, this makes it easy to customize what shows up before/after the login widget.

In s2Member > General Options > Membership Options Page I set the "Membership Options Page" to this login page. This works fine, when someone tries to access the restricted area the are prompted to login.

In s2Member > General Options > Login Welcome Page I set the "Login Welcome Page" to the protected "Gallery" page, this wasn't working until I figured out that the sidebar login plugin was controlling the redirect here, once I set the redirect in the plugin nearly everything is working great...

Now I just have one remaining problem. When a guest logs out (via the WP3.1 admin menu) they get redirected to the WordPress standard login window… yuk, this is what I'm trying to hide. Does s2m have an option I'm missing to set a page to redirect s2member defined user to? I want logged out guests to go back to the custom login page, not the default wordpress login page.
User avatar
jb510
Registered User
Registered User
 
Posts: 2
Joined: June 8, 2011

Re: Trouble configuring login and member options pages

Postby Cristián Lávaque » June 23rd, 2011, 12:56 pm

You could use wp_logout_url in the link to logout. https://codex.wordpress.org/Function_Re ... logout_url

Or you could have a redirection in .htaccess that takes those who landon /wp-login.php?loggedout=true to the page you want.

Or search in Google how others solved it http://www.google.com/search?q=wordpres ... ter+logout

I hope that helps. :)
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: Trouble configuring login and member options pages

Postby Cristián Lávaque » June 23rd, 2011, 1:40 pm

Just came across this plugin that could help you too https://wordpress.org/extend/plugins/login-with-ajax/

# Redirect users to custom URLs on Login and Logout


Haven't tried it, though, so I don't know how well it works with s2Member.
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: Trouble configuring login and member options pages

Postby jb510 » June 23rd, 2011, 2:55 pm

Thank you Cristián for the response. I am familiar with redirecting all users upon logout, but I was wondering if there was a way to target ONLY those with s2member roles to their own logout page, but still have regular admin/editor/contributor/author roles get sent to the default login page.

Ultimately, this isn't critical, I can just send everyone to the home page and tell admins/etc to click the login link, but as I said my preference would be that only the s2members got redirected on logout to the home page.
User avatar
jb510
Registered User
Registered User
 
Posts: 2
Joined: June 8, 2011

Re: Trouble configuring login and member options pages

Postby Cristián Lávaque » June 23rd, 2011, 6:24 pm

Well, you could use a conditional to check the role and determine the URL to use with wp_logout_url when you create the logout link.
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] and 2 guests

cron