Hi Guy,
So you want regular paying subscribers to see a profile page after logging in, but the free subscribers to go somewhere else?
To send all users to the Profile Page after logging in, you'll want to select the Profile Page as the Login Welcome Page in
WP Admin -> s2Member -> General Options -> Login Welcome Page.
Then the most simple way to redirect free subscribers is to use Advanced/PHP Conditionals (
WP Admin -> s2Member -> API/Scripting -> Advanced/PHP Conditionals) to check if the user viewing the Profile Page is a free subscriber (
s2member_level0). If they are a free subscriber, then the HTML Meta Refresh redirects them to another page.
- Code: Select all
<?php if (current_user_is("s2member_level0")) { ?>
<meta http-equiv="refresh" content="0; url=http://example.com/free-subscribers-area">
<?php } ?>
You'll need to install and activate the
PHP Execution plugin before adding this code to the top of your Profile Page (i.e., wherever you're using the
[s2Member-Profile /] shortcode.
The downside to this method is that the free subscriber will probably see the contents of the Profile Page for a brief moment before being redirected away.
If you want to get more advanced, you can use a
Custom Page Template for your Profile Page and then add the PHP code directly to that page template, preventing the
[s2Member-Profile /] shortcode from ever loading for free subscribers.