latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Redirect to separate pages on Log in

Home Forums Community Forum Redirect to separate pages on Log in

This topic contains 1 reply, has 2 voices. Last updated by  cassel 3 years ago.

Topic Author Topic
Posted: Friday Jan 3rd, 2014 at 11:06 am #62389
John Cook
Username: wisehippo

There are lots of posts around this subject but none seem to answer the basic question.

To redirect a specific Membership Level, and/or a Custom Capability, to a specific page.

Level 0 – Page A
Level 1 – Page B
Level 3 – Page C
Level 3 + ccap – Page D
Etc
Etc

I know this can be done via one welcome page using conditionals but then I can’t then have different side menus, advertising etc for the individual pages the way I need to.

I just need and easy, Idiot Proof (for I am an idiot clearly!), way to redirect? A Step by step instruction would be great.

Thanks for your URGENT help

John

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Friday Jan 3rd, 2014 at 11:33 am #62393
cassel
Username: cassel

Based on my own experience on my site, here is a possible solution (there might be something “prettier” but this is all I know)

<?php if (current_user_is("s2member_level0")) && !current_user_can('administrator')){ ?><script type="text/javascript">window.location = 'http://yourdomain/pageforlevel0';</script><?php } else {?><?php } ?>

<?php if (current_user_is("s2member_level1")) && !current_user_can('administrator')){ ?><script type="text/javascript">window.location = 'http://yourdomain/pageforlevel1';</script><?php } else {?><?php } ?>

And so on. I think you have to use the php because of the javascript code in there.
There is also the command && !current_user_can(‘administrator’) because, if you are the admin, you want to be able to see the page you want, and not be redirected automatically.

Would that work?

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.