Page 1 of 1

Change the redirect when logged in

PostPosted: July 8th, 2011, 3:51 pm
by laurawhiteritchie
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!!

Re: Change the redirect when logged in

PostPosted: July 8th, 2011, 4:20 pm
by laurawhiteritchie
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. :)

Re: Change the redirect when logged in

PostPosted: July 8th, 2011, 8:46 pm
by Cristián Lávaque
Nice! Well done for solving that. :)

Let us know if you need help with anything else.