Community Support Forums — WordPress® ( Users Helping Users ) — 2011-03-05T00:40:58-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=2598 2011-03-05T00:40:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2598&p=7413#p7413 <![CDATA[Re: Disable Incremental Access]]>
WP Admin -> s2Member -> API / Scripting

Example #3 under Using Advanced Conditionals answers your question pretty well:

Code:
Example #3: Specific content for each different Member Level.

<?php if (current_user_is("s2member_level4")){ ?>
    Some premium content for Level 4 Members.
<?php } else if (current_user_is("s2member_level3")){ ?>
    Some premium content for Level 3 Members.
<?php } else if (current_user_is("s2member_level2")){ ?>
    Some premium content for Level 2 Members.
<?php } else if (current_user_is("s2member_level1")){ ?>
    Some premium content for Level 1 Members.
<?php } else if (current_user_is("s2member_level0")){ ?>
    Some content for Free Subscribers.
<?php } else { ?>
    Some public content.
<?php } ?>


You can also use a switch with an API constant, instead of the conditional function. Something like:

Code:
switch S2MEMBER_CURRENT_USER_ACCESS_LEVEL {
    case 4:
        echo 'Some content for level 4 members.';
        break;
    case 3:
        echo 'Some content for level 3 members.';
        break;
    case 2:
        echo 'Some content for level 2 members.';
        break;
    case 1:
        echo 'Some content for level 1 members.';
        break;
    case 0:
        echo 'Some content for free members.';
        break;
    default:
        echo 'Some public content.';

Statistics: Posted by Cristián Lávaque — March 5th, 2011, 12:40 am


]]>
2011-03-04T19:15:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2598&p=7406#p7406 <![CDATA[Disable Incremental Access]]>
Is there any way so every membership level can access only its content alone ?

Thanks.

Statistics: Posted by danv09 — March 4th, 2011, 7:15 pm


]]>