Thanks Cris
The admin can't view any level using this:
- Code: Select all
<?php if (current_user_can("access_s2member_level1")){ ?>
Some content for Members who are logged in with an s2Member Level >= 1.
<?php } else { ?>
Some public content.
<?php } ?>
Now if it's set to this, no problem
- Code: Select all
<?php if(is_user_logged_in()){ ?>
Content for anyone that is logged in, regardless of their Membership Level.
<?php } else { ?>
Some public content.
<?php } ?>
If you change it using current_user_can still no admin access to different levels beside level 0
I know I am missing something in here...
* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 & 3.
* A Member with Level 3 access, will also be able to access Levels 0, 1 & 2.
* A Member with Level 2 access, will also be able to access Levels 0 & 1.
* A Member with Level 1 access, will also be able to access Level 0.
* A Subscriber with Level 0 access, will ONLY be able to access Level 0.
* A public Visitor will have NO access to protected content.
Now, Level 4 role is basically higher than the administrator role when viewing restricted contents because the admin is not a level.
Would you please show how can we rewrite the code above for them to have access to different levels. Or if you have steps of doing so will be great. Thank you Cris
Would something like this work
- Code: Select all
global $current_user;
get_currentuserinfo();
If($current_user->user_login != ‘admin‘)