WordPress.org

Forums

WP-Members: Membership Framework
[resolved] [WP-Members] Multi Level User Access (7 posts)

  1. pmagony
    Member
    Posted 3 years ago #

    Multiple user levels.

    I need to be able to show/hide content, based on user levels.

    The ideal set-up would go something like this:

    Level 1
    Level 2
    Level 3
    Level 4

    If user is assigned to Level 3, and user is logged in, they will only see "Level 3" specific content.

    Please advise.

    Thanks!

    http://wordpress.org/extend/plugins/wp-members/

  2. Chad Butler
    Member
    Plugin Author

    Posted 3 years ago #

    There is nothing currently built into the plugin's default settings to do what you are describing. However, the plugin runs a filter for content that determines if the content should be blocked or not (wpmem_block). If it is not blocked, the filter returns false. If it is blocked, it returns true. At the end, prior to returning this value, a filter (wpmem_block) is applied. So you could hook into that and alter this true/false boolean based on whatever criteria you want.

    You have at your disposal many WordPress functions for determining how you might want to alter this value or leave it unchanged.

    add_filter( 'wpmem_block', 'my_block_filter' );
    function my_block_filter( $block );
    {
    	if( $some_criteria ){
    		// if this is the case, then block the content
    		return true;
    	} else {
    		// if this is the case, then unblock the content
    		return false;
    	}
    }
  3. beeann
    Member
    Posted 2 years ago #

    Hello I know this is an older thread but in interest of streamlining the support forums I am posting here. I read through the manual, your website and this support forum and have the same need as the person above. I provide paralegal services and I would need each client to have access to their own specific content which is not seen by anyone else. I see you have done some updates on the plugin anything that affected this capability or is it still necessary to take a tad bit of a round about approach?

    Great job on this plugin.

  4. beeann
    Member
    Posted 2 years ago #

    There is a plugin that offers user specific content restriction but it does not have nearly the amount of documentation and obvious dedication that yours does.

  5. Chad Butler
    Member
    Plugin Author

    Posted 2 years ago #

    It's possible that could be done either with the wpmem_block filter, the wpmem_securify filter, or a combination of both.

    There is documentation on wpmem_block in the User Guide and also (premium) code snippets on rocketgeek.com.

    The wpmem_securify filter hook is new in 2.7.7 but is similar to wpmem_block. But as it is new in the most recent release, there is not much in the way of documentation yet.

  6. moliver1
    Member
    Posted 2 years ago #

    Hi!

    First your plugin is so great! I got only two membership levels, added the dropdown field in the registration page.The Basic level has a few pages restricted, whereas the special level has full access. Please help me how to manage the pages so I can restrict pages to Basic members.

    http://www.sacredvainstitute.com/register/

    http://wordpress.org/extend/plugins/wp-members/

    Thanks in advance,
    .Maribeth

  7. moliver1
    Member
    Posted 2 years ago #

    I tried another plugin which focuses on page restrictions to certain member groups. Works fine for now. But if WP members can also have that feature in the works. By golly, you rock!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Members: Membership Framework
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic