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.

Creating mutually exclusive levels

Home Forums Community Forum Creating mutually exclusive levels

Tagged: ,

This topic contains 3 replies, has 3 voices. Last updated by  cassel 3 years ago.

Topic Author Topic
Posted: Tuesday Dec 17th, 2013 at 12:26 pm #62003

Hi there, I can see how to create levels e.g. 0 , 1, 2 etc, where level 3 users can access evrything assigned to level 0,1,2.

I want to create a free site that requires login to member area. There will be two types of users e.g. level 1 and level 2. Level 1 should only be able to see level 1 pages, and level 2 should only be able to see level 2 pages.

Is this possible?

Also I want to have 2 main menus for both type of users.

How can this be achieved?

Thanks

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Tuesday Dec 17th, 2013 at 2:09 pm #62008
cassel
Username: cassel

Yes you can but it would have to be using conditionals OR Custom capabilities.

If you use the default settings for level 1 and 2 and so on, as you know, it is cumulative, but if you want to limit access to certain content to Level 2 members only, you can wrap the content in a shortcode like this:

[s2If current_user_is(s2member_level4)]
    Some premium content for Level 4 Members.
[/s2If]

[s2If current_user_is(s2member_level3)]
    Some premium content for Level 3 Members.
[/s2If]

[s2If current_user_is(s2member_level2)]
    Some premium content for Level 2 Members.
[/s2If]

[s2If current_user_is(s2member_level1)]
    Some premium content for Level 1 Members.
[/s2If]

[s2If current_user_is(s2member_level0)]
    Some content for Free Subscribers.
[/s2If]
Posted: Wednesday Dec 18th, 2013 at 1:14 pm #62030

Hello,

I’m glad to find this topic. My follow up also deals with mutually exclusive levels. If I have mutually exclusive content for program 1, program 2, program 3, and program 4.

As I understand the response above: if a user is level4, I can wrap premium content for level 4 members only. However, what if that user decides to purchase premium content at level 2.

Can I allow a single user to access multiple mutually exclusive levels of premium content? Ex: single user can access program 2 and program 4, but not program 1 and program 3.

Posted: Wednesday Dec 18th, 2013 at 3:29 pm #62031
cassel
Username: cassel

Can I allow a single user to access multiple mutually exclusive levels of premium content? Ex: single user can access program 2 and program 4, but not program 1 and program 3.

A member can only BE at one level at the time, so in a way, no, it would not work. However, if you want to consider those levels like different “departments” (instead of levels), then, you might as well use the Custom Capabilities (ccaps). You would assign one ccaps with the name of your choice, to the content of your choice.

For example, you can have a ccap called “photography” and one called “editing”. All the pages, and posts you want accessible to someone who purchases “photography” package would get it if you use the code:

[s2If current_user_can(access_s2member_ccap_photography)]
    Display content for that topic
[/s2If]

But if you want someone to have access to more than one, you can use this kind of code:

[s2If current_user_can(access_s2member_ccap_photography)]
    Display content for that topic
[/s2If]
[s2If current_user_can(access_s2member_ccap_editing)]
    Display content for that topic
[/s2If]

So now, if a member purchases the access to the “photography” content, they can ALSO purchase the “editing” content later. As long as you have only ONE recurring payment/subscription, they can be purchased separately just like individual courses.

Does that help?

Viewing 3 replies - 1 through 3 (of 3 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.