Page 1 of 1

Is the login page seen based on mebership level possible?

PostPosted: November 15th, 2011, 7:27 pm
by MarkMBravura
Hi,

At one point quite some time back, I though I had discovered a way to make it where L0's see one login page and L1's see another. I cannot for the life of me find that info now.

Is this in fact possible? If so, how would I go about it?

Many thanks in advance,

Mark

Re: Is the login page seen based on mebership level possible

PostPosted: November 15th, 2011, 11:57 pm
by Bruce C
Are you talking about showing different content on the same page, or actually different pages?

If you want to show different content on the same page based on level, you can use Shortcode Conditionals ( Dashboard->s2Member->API/Scripting->Simple/Shortcode Conditionals ).

Otherwise, if you're looking to show a different page for each level, you can set different URLs for the Login Welcome Page for each level using replacement codes under the dropdown in Dashboard->s2Member->General Options->Login Welcome Page.

Hope that helps!

Re: Is the login page seen based on mebership level possible

PostPosted: November 16th, 2011, 12:16 am
by MarkMBravura
Hi Ace,

Thank you for your reply. I went to where you indicated under 'General options', and where you'd typically supply an external login page link, 'Replacement Codes' was hotlinked and said this on the popup...

For example, if you're using BuddyPress, and you want to redirect Members to their BuddyPress Profile page after logging in, you would setup a Special Redirection URL, like this: http://wpvoyage.com/members/%%current_user_login%%/profile/

Or ... using %%current_user_level%%, you could have a separate Login Welcome Page for each Membership Level that you plan to offer. BuddyPress not required.


It appears that is exactly what I need. My question though, is would each place marker be comma-delimited (i.e. url1,url2)?

Your help is greatly appreciated!

Best regards,

Mark

Re: Is the login page seen based on mebership level possible

PostPosted: November 16th, 2011, 12:24 am
by Bruce C
Hi again Mark,

You're only supposed to input 1 URL into the field. You can use the replacement code %%current_user_level%% to allow the URL the user is directed to to be the correct page for the user.

So it would be like this:

If you put in http://yoursite.com/login-welcome-page-%%current_user_level%%, then the login welcome page for a level 1 user would be http://yoursite.com/login-welcome-page-1.

What you will have to do is create pages with different slugs based on your settings in that field. So you would create any number of Login Welcome Pages based on how many levels you have.

Hope that helps!

Re: Is the login page seen based on mebership level possible

PostPosted: November 16th, 2011, 12:31 am
by MarkMBravura
Hi Ace,

Very cool... so in effect the replacement code acts as a type of wild card in conjunction with the slug. I truly appreciate this and now am off to test it out.

Best regards,

Mark

Re: Is the login page seen based on mebership level possible

PostPosted: November 16th, 2011, 1:03 am
by MarkMBravura
You da Man, Ace!

Worked flawlessly with two separate penny tests done with two separate WP L0 users.

Thanks again,

Mark

Re: Is the login page seen based on mebership level possible

PostPosted: November 17th, 2011, 11:36 am
by Cristián Lávaque
That's one popular solution.

I personally prefer to have a single page and use conditionals to show different content in it. Keeps everything in one place. Just mentioning it so you know there's that option. :)

Re: Is the login page seen based on mebership level possible

PostPosted: November 17th, 2011, 4:35 pm
by MarkMBravura
Thanks Christian,

I did consider the possibility, however for this purpose two pages is optimal.

Best regards,

Mark

Re: Is the login page seen based on mebership level possible

PostPosted: November 21st, 2011, 1:10 am
by Cristián Lávaque
Cool. :)