Conditional for Level 0 and Level 1

Hello all.

I am trying to show some content if someone is level0 OR level1.

But this short code is not working:
[s2If current_user_can(access_s2member_level0) OR current_user_can(access_s2member_level1)]
Show this to ONLY Level 0 and Level 1 members.
[/s2If]

Any help will be greatly appreciated.

Are there any errors showing in the developer console? Press [F12] while browsing the page and then click the Console tab.

1 Like

Hi.

Appreciate the response.

I should have been more clear about what I meant when I said “this code is not working”.

There are no errors. But the reason why I said it is not working is because this content is showing up for other levels too. For example, Level 3 also sees this line of text.

Any ideas…??

Use this to do a “strict limitation”:

[s2If current_user_is(s2member_level0) OR current_user_is(s2member_level1)]
Show this to ONLY Level 0 and Level 1 members.
[/s2If]

You need this form because higher levels in s2M can access the content for lover levels.

Edit: fixed the code, my fault… Thanks, @KTS915!

1 Like

Thanks for the response krumch.

Unfortunately, now none of the levels can see this content.

I logged in as a level 0 member and then as a level 3 member and neither of those two accounts can see this content.

Please advise.

Actually, you were wrong when you said the code was not working. It was working perfectly. Level 3 users are supposed to be able to access level 0 and level 1 content.

This is the code you want:

[s2If current_user_is(s2member_level0) OR current_user_is(s2member_level1)]
Show this to ONLY Level 0 and Level 1 members.
[/s2If]

Did not know that. Hence my statement.

Your code worked. Thanks.