Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

How to check for membership level within a role?

Simple Membership Plugin › Forums › Simple Membership Plugin › How to check for membership level within a role?

  • This topic has 6 replies, 3 voices, and was last updated 11 years, 6 months ago by kathlynn.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • May 11, 2015 at 12:36 am #1734
    kathlynn
    Participant

    I have 2 membership levels – Doctor and Nurse. They are both subscribers.

    I have additional fields on my page that I would like to hide. The plugin works wonderfully with WP’s WYSIWYG editor, but does not work on the additional fields. Hence I need to do the extra checking.

    I am able to check if current logged in users are subscribers using user_can($current_user, "subscriber"). How do I further determine if they are Doctor or Nurse?

    And before I can do that, I will need to know the membership level that can access the content.

    Thanks in advance.

    May 11, 2015 at 2:06 am #1736
    mbrsolution
    Moderator

    Hi kathlynn, have you also enabled the level of protection found at the end of a post or page in edit mode?

    For example.

    Do you want to protect this content?
    No, Do not protect this content.
    Yes, Protect this content.
    Select the membership level that can access this content:
    Nurse
    Doctor

    May 11, 2015 at 2:30 am #1737
    kathlynn
    Participant

    Yes I have already done that. It works very well with the_content() but does not work with the custom fields that I have added.

    What I have to do now is to try to manually check if user is a subscriber, then check if user is a doctor or nurse. Is this possible?

    May 11, 2015 at 2:46 am #1738
    mbrsolution
    Moderator

    Hi I don’t understand what you mean by custom fields? Can you explain further.

    Thank you

    May 11, 2015 at 6:59 am #1739
    kathlynn
    Participant

    Have you heard of a plugin called Advanced Custom Fields?

    I’m using something similar called Masterpress.

    Basically these plugin lets you add additional content blocks to the edit page or edit post page, instead of just a plain text editor.

    I understand that Simple Membership Plugin is not able to hide these additional content. I’m looking for a way where I can check and hide these content manually.

    Thank you.

    May 12, 2015 at 5:44 am #1741
    admin
    Keymaster

    We will create a documentation with some example code so you can use that to apply custom protection.

    May 12, 2015 at 5:57 am #1742
    kathlynn
    Participant

    That’s awesome. Thank you. Looking forward to that!

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy