Change WordPress user roles and capabilities › Forums › Bug Reports › “no role for this site” & [user_role_editor roles=”none”] › Reply To: “no role for this site” & [user_role_editor roles=”none”]
Thanks.
Tested with this code:
TEST 1. roles=”none” for a user NOT LOGGED-IN:
RESULT: [user_role_editor roles=”none”]you are NOT LOGGED-IN[/user_role_editor]
[user_role_editor except_roles=”none”]you are LOGGED-IN[/user_role_editor]
TEST 2. roles=”no_role” for a user with NO-ROLE-FOR-SITE (or not logged-in):
RESULT: [user_role_editor roles=”no_role”]your profile is NO-ROLE-FOR-SITE (or you are not logged-in)[/user_role_editor]
[user_role_editor except_roles=”no_role”]your profile is any, except NO-ROLE-FOR-SITE[/user_role_editor]
WORKS PERFECT!
if you want to update
I have wrote this:
If you wish to show some content for users with no role (“— No role for this site —”) or not logged in, use this shortcode [user_role_editor roles=”no_role”].