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 } ?>
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
Statistics: Posted by danv09 — March 4th, 2011, 7:15 pm