Membership Rules Question

hey there. I have a question about membership rules. is it necessary to populate both positive and negative fields in membership level settings? I ask because if I assign a positive rule for "University of Tutuology" in the Premium Level, is it necessary to place the remaining elements (on the right side) in to the Negative Rules?

I can't wrap my brain around this quite yet.

  • DavidM

    Hi tutuology,

    Nope, it's not at all necessary to use all the rules or to utilize both positive and negative rules even. As for myself, I try to limit the rules to one or the other, positive or negative, just to keep things as simple as possible.

    Also, I'm not sure if you've seen it or not, but the following tutorial from the wpmu.org blog goes provides a great example that helps explain these things a bit more.
    https://premium.wpmudev.org/blog/create-a-simple-tutorial-site-with-the-wpmu-dev-membership-plugin/

    There's also the following tutorial too, which is quite advanced and likely would not be needed in your case, but may still help in understanding it all.
    https://premium.wpmudev.org/blog/drip-feed-your-content-with-the-wpmu-dev-membership-plugin/

    Cheers,
    David

  • tutuology

    lol....I am very familiar with these 2 tutorials....they have been UNBELIEVABLY helpful and it was my intention to post a link to them in one of these threads I have open (because everyone with a membership site would benefit hugely from the info in these tutorials).

    Thanks for clearing that up with me. I guess I didn't understand the benefit or logic of defining both neg. and pos. rules in the levels.....I would say one or the other. :slight_smile:

  • tutuology

    I need just a bit of clarification. With rules, how should I set them up if for example I want ALL visitors (registered an not registered) to see that there is a section called "Advanced Tutorials" BUT they cannot see the content (again, they can see that there IS content but they are only able to view it if they are premium members or above?

    Would love clarification on this as I am running in to a problem with it. If an unregistered visitor or free member is on my site, currently- they can't even see that such areas of the website exist (so they won't now that more valuable content is available).

  • DavidM

    Ah, I see now. I think what you'd need then is Membership shortcodes! You can create them in Membership > Edit Options as illustrated here:

    And with that, on the pages where you want the content displayed differently depending on membership level, you simply use them somewhat like this:

    [Free]
    This content is only available to Premium members. Check out our signup page for information on how to become a Premium member.
    [/Free]

    [Premium]
    Welcome Premium member!
    [/Premium]

    [Elite]
    Welcome Elite member!
    [/Elite]

    How would that work for you?

    -David

  • tutuology

    ughh! I am having such a hard time with this :slight_frown: So, is there something I need to add to functions.php?
    I am beyond confused. So that I can better understand (if you don't mind), let's use a real-life demonstration. The parts of my site that I want restricted to premium and elite members only is: University of Tutuology (the page titles University of Tutuology is visable to all, they just can't click on the categories and links within the U of T page). I also want to limit Buddypress access to premium and elite members. In other words, people have to be a paying member to access the buddypress area and the U of T.

    With that, what would this look like in membership options andwould I need to add something to functions.php?

  • tutuology

    Sorry David that I am having troubles with this. Would you please take a look at my site (tutuology dot com)? In the menu, please click on University of Tutuology. You will see "Levels & Features" and "University of Tutuology". Under "University of Tutuology", there is "Member's Area", then additional dropdowns (subcategories).

    I want for the "Member's Area" and all of the subcategories here VISIBLE to Visitors & Free Members, but restrict access to the actual content.

    Would you please give me an example (on one of them, let's say 'Book Updates') of how I would align this in membership options and shortcodes?

    Thanks for all of your help. I think I am almost there :slight_smile:

  • DavidM

    Hi tutuology,

    Really sorry I missed responding on this. You wouldn't need to add anything at all to functions.php, there's no coding involved in using Membership shortcodes.

    Basically, you just create your shortcodes in Membership > Edit Options, let's say as follows:
    free-level
    premium-level

    You then just wrap the content that you want hidden/restricted with a shortcode. From there, you can restrict/show those content pieces in your membership rule areas.

    Then, you drag and drop the Shortcode rule into, let's say, the positive area. And for the Free/Visitor/Stranger level you tick only those Membership shortcodes that you want them to see.

    In this case, let's say you want to display a message to free members or strangers, when creating the content, you wrap it with that [free-level] shortcode like so:
    [free-level]Please sign up as a premium level to view this content.[/free-level]

    Then in the Premium levels, you tick the [premium-level] shortcode, so the premium level members can see all that content. And for the content in the page (University of Tutuology), you show the premium content wrapped with that shortcode, perhaps like so.
    [premium-level]This is premium content[/premium-level]

    From there, free level members and visitors will see the message to sign up. Meanwhile premium members will see the intended content.

    Perhaps that'll help to explain?

    Cheer,s
    David

  • tutuology

    It's OK David....no worries at all. You guys manage to keep up with all of us somehow.... I don't know how you do it :slight_smile: I know sometimes we get lost in the shuffle, but at least you come back :slight_smile:

    I am going to try giving this another go (I have to- LOL). But I am off the clock at 4:30 when my kiddos get home from school, so it might have to wait until tomorrow. Since I have your attention, would you have a look at a few things? For some reason, the "no access" message is appearing alongside content on many of my pages. It's so weird! These are pages that are not restricted to visitors or free members. I'll attach some screenshots.

    Also, I am getting a 404 on my "Charity" page (but it is most definitely there). Any ideas why? I had a problem with this on my previous install also (ughh!)...multiple pages and posts and never resolved it. The ultra wonderful super duper terrifically amazing and equally talented [Gina] held my hand through a fresh install, some styling issues, and some customization b/c my sites functionality was waaay out of hand. Oh my gosh - I never could repay her-such genuine kindness...sooo, my site is MUCH more friendly...just these few minor issues.

  • tutuology

    Hi David-
    I am having such a difficult time with this, but I am not sure why. I had it figured out, but then I upgraded my theme and buddypress and for whatever reason, can't get it to work out. I think I would like to hire someone (at this point). I have recently posted a job, but nothing (the job is regarding the styling with studio-child....it's not right).

    I thought I would give this one last go here on the forums. I have a new section in the menu under "university of Tutuology" called "members area". Everything in this section should be restricted to either premium or elite members. I have written a new post in "book updates". This should be restricted, but I cannot seem to manage the proper config. I have the shortcode inserted (for free members to see that the content is private) but I am just getting a 404. Any ideas?

  • paulgregory

    Hi. I assume your problem is that it 404s when a non-member tries to view the book update post.

    The shortcode business appears to let you have some parts of a page visible to non-members and some parts visible to members. However, if the page or post itself is restricted, then it will 404 (depending on your config, a custom 404 "Protected content page") before the content is processed.

    So if you want a page to show a message to non-members and content to members, you need to mark it up with shortcodes ONLY.

    I hope this helps.

  • tutuology

    Thanks for that @Elite.
    I think I have it figured out now, but there are so many steps to take to properly configure it. I have it working mostly, although I know it is not the way I had it configured before. As long as it works I suppose.

    The only quirky thing I am dealing with now is that the no access message remains, and is followed by the protected content once the qualified user is logged in. So, if not qualified, one only sees the no access message. If qualified and logged in, you still see the no access message along with the restricted content. Any ideas about this anyone?

  • Mason

    Hiya tutuology,

    Is this still an issue? Were you able to check for an additional shortcode in your settings? Please let us know.

    (And I'm not called Elite, I have an Elite membership. I don't know why this information is now prominent under my picture rather than preceding "Member" but WPMU Dev must have a non-stupid reason.)

    @paulgregory, it's a work-in-progress at the moment :wink:

  • Mason

    Hiya,

    As we haven't heard back from you we're going to assume the problem was sorted out and mark this ticket as resolved.

    If it wasn't resolved, or you have any more questions related to this thread please feel free to post them below and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Otherwise, thanks for using the forums, and for being a member of WPMU DEV, it's a pleasure to help you out and we look forward to being of assistance in the future.

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.