latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Multiple Conditions On Page Breaks

Home Forums Community Forum Multiple Conditions On Page Breaks

This topic contains 5 replies, has 2 voices. Last updated by  Cristián Lávaque 3 years, 1 month ago.

Topic Author Topic
Posted: Tuesday Nov 12th, 2013 at 6:39 am #61038

Hi

So I have 2 conditions for a member options page one to show text to users not logged in and one to show to users who are level 0.

When I have the short codes as follows the user not logged in can see just the text they are meant to see. The logged in user (at level 0) cant see anything they are meant to…

[s2If !is_user_logged_in()] text for all not logged in to see [/s2If]
[s2If current_user_can(access_s2member_level0)] text for level 0 users to see [/s2If]

If however I drop the last [/s2If] so the page looks like as follows:
[s2If !is_user_logged_in()] text for all not logged in to see [/s2If]
[s2If current_user_can(access_s2member_level0)] text for level 0 users to see

The logged in user (at level 0) can only see the text they are meant to see. However the user who isnt logged on can see what they are meant to see as well as what the logged in user can see.

Swift response appreciated.

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Tuesday Nov 12th, 2013 at 7:08 am #61040

That’s odd. The conditional seems fine.

Does this one work?

[[s2If current_user_is(s2member_level0)]
Some content for Level 0 users.
[/s2If]]
Posted: Tuesday Nov 12th, 2013 at 7:35 am #61042

Hi

Nope logged on members see nothing (at level 0) and logged out members only see what they are meant to see. Here is the page code (edited to remove paypal button info)

[s2If !is_user_logged_in()]

Content for users not logged in to see

[/s2If]
[s2If current_user_is(s2member_level0)]

Content for user level 0 to see

[/s2If]

Posted: Tuesday Nov 12th, 2013 at 7:49 am #61043

Okay. Are you sure the logged in user is at Level 0?

What happens if you try this one?

[[s2If is_user_logged_in()]
Content for users logged in to see
[/s2If]]
Posted: Tuesday Nov 12th, 2013 at 9:29 am #61045

Hi

Thanks, thats working now

Posted: Tuesday Nov 12th, 2013 at 10:34 pm #61059

Great. :)

Viewing 5 replies - 1 through 5 (of 5 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.