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™

Change the redirect when logged in

s2Member Plugin. A Membership plugin for WordPress®.

Change the redirect when logged in

Postby laurawhiteritchie » July 8th, 2011, 3:51 pm

I have two membership levels in my course. S1 for members and S2 for reviewers. The content in the course is only available to S2 until I'm ready for it to go live, and then I just change it to S1. That way, my reviewers have full access to all of the content, but students follow along with the class.

The problem is, when a student (S1) clicks on content that isn't available yet, S2Member directs them to the Membership Options screen telling them they need to register. They're already registered. That's just confusing. I want them to either be redirected to a page that says that content isn't available yet or set a conditional shortcode on the page that tells them it isn't available yet.

I think I can do it with the shortcode, but that means I have to edit the posts AND the access level to set a post live for students. The more steps I have in the process, the more likely I am to mess it up.

So, is there an easier, less manual way to do this?

Thanks so much!!
User avatar
laurawhiteritchie
Registered User
Registered User
 
Posts: 2
Joined: July 8, 2011

Re: Change the redirect when logged in

Postby laurawhiteritchie » July 8th, 2011, 4:20 pm

Oh, never mind. I figured it out.

I was thinking about it the wrong way....how to put the conditional shortcodes on the posts. But all I needed to do is put the shortcodes on the membership options page.

So, for anyone else trying to figure this out, here's what I did:
[s2If is_user_logged_in()]Whoa Nelly!

I looks like you're trying to access stuff that isn't available yet. Be patient. All will be revealed in time.

[/s2If]

[s2If !is_user_logged_in()]

The normal registration/membership options page.

[/s2If]

I used the same trick on the home page. Elegant and simple. :)
User avatar
laurawhiteritchie
Registered User
Registered User
 
Posts: 2
Joined: July 8, 2011

Re: Change the redirect when logged in

Postby Cristián Lávaque » July 8th, 2011, 8:46 pm

Nice! Well done for solving that. :)

Let us know if you need help with anything else.
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: Exabot [Bot], Google [Bot] and 1 guest

cron