Can multiple membership levels access the same content?

Hi Folks,

Can I have an area of protected content that is accessible by more than membership level?

For example if I have four levels:

* Group A
* Group B
* Group C
* Group D

I want to have certain areas of the site be accessible to anyone with a Group B level.

Then some areas of the site might require a Group B level to access them and others still a Group C level to access them.

However I want to have the entire site be available to Group A level members.

The other possibility might be that I would want a Group D that could access multiple levels ( like a mix of Group A and Group B content), but still not have full site access like the Group A level provides.

Is this possible with Membership?

Also (before someone suggests it), I can not use the PPV plugin to do this since it relies on cookies. I need the ability to control the access based on the login.

Thanks!

  • tbalves
    • Design Lord, Child of Thor

    The short answer to this would be yes. It is all about how you enclose the info on the desired pages with the correct shortcodes.

    Example:

    [group a]
    [group b]
    Groups A and B would be able to see this content.
    [/group b]
    [group c]
    Groups A and C would be able to see this content
    [group c]
    [/group a]

    While each group may be able to navigate to this page, only those with the proper permissions would then be able to see the content.

    Does this answer your question?

  • LANSRAD
    • Site Builder, Child of Zeus

    That does not seem to work (at least on my localhost XAMP test).

    If I nest tags like this:

    [level-gold]
    [level-one]

    This is protected content that should be seen by level one or level gold.

    [/level-one]
    [/level-gold]

    Then neither a level one or a level gold user can see the content.

    If I set it like this:

    [level-gold]

    This is protected content that should be seen by level one or level gold.

    [/level-gold]

    Then the level gold user can see it (or the same with level one if I use that tag).

    Am I missing a setting somewhere perhaps?

  • LANSRAD
    • Site Builder, Child of Zeus

    Hmmm... this post:

    https://premium.wpmudev.org/forums/topic/conditional-membership-levels

    Seems to say that there would be no way to do this other than to duplicate the content and use a different tag/level to represent the nested levels.

    This is REALLY frustrating as I am trying to figure out how to use my WPMU tools to create a new content site (even to the point of changing my planned models).

    But not being able to do nested levels or have multiple levels per user (or even just a super level that you could say can access the entire site) is really killing me here.

    Hopefully someone has an answer and it is just me just not seeing the forest for the trees!

    :slight_smile:

  • LANSRAD
    • Site Builder, Child of Zeus

    Thanks Tom!

    Nested tags would be a BIG improvement for the plugin - allowing it to be used more efficiently in larger (real world) situations like we want to build.

    There are some other Membership plugins out there that do it.

    One way I saw that was well done was to allow nesting like this:

    [level-gold|level-one]
    Protected content
    [/level-gold|level-one]

    and also like this

    [level-gold|level-one]
    Protected content
    [/private]

    The idea was to use the pipe symbol between the nested level tags, then you could either close them out by name individually or close all tags with the [/private] code.

    I look forward to seeing what @Barry has to say on it.

  • LANSRAD
    • Site Builder, Child of Zeus

    I wanted to mention that I have been digging up something that **might** be a workaround (albeit a clumsy one) untill we get an update from @Barry.

    There is a plugin called RPS Include (and a companion one called RPS Blog that can give you the post or page number) that I found here:

    https://premium.wpmudev.org/blog/rps-include-content/

    You can put content in your post or page like this:

    -------------------------------------------

    This is unprotected content

    [level-gold]
    [rps-include post=75]
    [/level-gold]

    [level-one]
    [rps-include post=75]
    [/level-one]

    -------------------------------------------

    That works (and you can do a page=## to pull in pages) and allows content to be accessed from either the level-gold or level-one users.

    However it requires you creating separate posts or pages (published as private) for the actual content and since your includes are numeric, the actual post is sort of nonsensical.

    One other thing I am seeing with this is that the default message in Membership settings for shortcode protected content is being displayed multiple times (one for each set of levels as shown above).

    So one has to leave that message blank - not desirable since it means you leave the user thinking there is no content there.

    So I am still stuck it seems if I want to use my WPMU tools.

  • Barry
    • DEV MAN’s Mascot

    [rps-include post=75]

    I like this idea / functionality and think it might actually be useful in the plugin.

    I'll have a look / think of a way to do multiple shortcodes / protection, but I don't know if it will be of help in the meantime, but there are "not" shortcodes already available in the plugin. So if you wanted some content available to only members, and you had a strangers level called "visitors" then you could wrap the content in:

    [not-level-visitors]
    content
    [/not-level-visitors]

  • LANSRAD
    • Site Builder, Child of Zeus

    Thanks Barry,

    I'll look at that, but definitely need the ability to have the content be available in multiple levels.

    The problem with my "You don't have access to this content" being shown once for each level I am testing for is a problem though.

  • Sean Johnson
    • Site Builder, Child of Zeus

    @Lansrad,

    In regard to

    The problem with my "You don't have access to this content" being shown once for each level I am testing for is a problem though.

    You could insert javascript into the content inside the shortcode tag that will remove the extra no-access messages.

    [level-member]Some Protected Content<script type="text/javascript">// <![CDATA[
    jQuery(document).ready(function () {jQuery('.protected_c').remove();});
    // ]]></script>[/level-member]

    In Membership options I simply placed certain no-access messages inside of a div with class="protected_c"

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.