How To Setup a Membership Site Based On User Role Permissions

Membership sites aren’t the easiest to setup for many reasons.

Even though there’s some fantastic membership plugins, there’s so many features which can cause some people frustration and confusion.

Some of these plugins which i have already written about are:

If you have plenty of time and are prepared to learn about all the different settings and options, then these 3 are amongst the best.

They will enable you to integrate PayPal, Aweber, MailChimp and other services into your membership site.

If you simply need to restrict content on your site, without wanting to integrate directly with your favorite email service or charge your members using a payment gateway, there’s any easy solution.

Members Plugin

The members plugin has been around for a while and has been developed by Justin Tadlock who has created more than 20 plugins.

Its a simple yet popular plugin which allows you to restrict access on a per page or post basis.

You can also restrict access to part of a page or post using shortcodes rather than restrict the entire page.

Plugin Settings

Super easy plugin to setup as it uses the core WordPress roles & capabilities.

 

Roles Manager

 

Go to Settings > General and check the membership box so anyone can register.

Then set the new user role to subscriber from the drop down menu.

Membership User Role

Restrict Content

Here you can create a custom message to be displayed when the public access content you have restricted to registered members only.

Content Permissions

You can either create a html link or use shortcodes in this box.

The message is displayed and allows your visitors to click and link which redirects them to a registration and login page.

Another option would be to create a nice graphic using your favorite design software and paste the html in here.

Single Post/Page Content Permissions

You can also setup restricted access on single posts and pages.

You’ll find this module located under all post/page edit screens.

Per Post-Page Content Permissions

 Sidebar Widget

Once you install and activate this plugin you’ll find a widget you can customize and drag into your sidebar.

This existing members to login and new members to register.

Sidebar Widget

Private Site

Use these settings if you want to make your entire site private to members only.

Private Site

Shortcodes

This content about shortcodes has been sources directly from the read me file you’ll find in the plugin download folder.

There are several shortcodes that you can use in your post editor or any shortcode-ready area..

[access]

The [access] shortcode is for hiding content from particular roles and capabilities. You need to wrap your content when using this shortcode:

[access role=”editor”]Hide this content from everyone but editors.[/access]

Parameters:

  • capability: A capability that has been assigned to a role.
  • role: A user role from WordPress or one that you’ve created.
  • feed: Set to true if you’d like to show the content in feeds.

Note that capability and role parameters aren’t used in conjunction.

The code first checks for the capability (if input) then checks for the role (if input).

To check for multiple capabilities or multiple roles, simply add a comma between each capability/role. For example, the following code checks for an editor or administrator:

[access role=”administrator,editor”]Hide this content from everyone but administrators and editors.[/access]

[is_user_logged_in]

The [is_user_logged_in] shortcode should be used to check if a user is currently logged into the site. If not, the content will be hidden.

[is_user_logged_in]This content is only shown to logged-in users.[/is_user_logged_in]

This shortcode has no parameters.

[feed]

If you have content you only want to show to subscribers of your feed, wrap it in this shortcode:

[feed]This content will only be shown in feeds.[/feed]

This shortcode has no parameters.

 Pro’s

  • You can use this plugin to build blog subscribers without using a premium service like Aweber or MailChimp
  • Allow access to the content of a page or post but not the video on the page.
  • Export subscribers and import them into your email service without using a more complicated membership plugin.

Cons

  • Cannot integrate directly with your email service
  • Cannot charge members for access using PayPal or other payment solutions

Comments

2 responses to “How To Setup a Membership Site Based On User Role Permissions”

  1. Hey Brad,

    Is this the WordPress plugin you are referring to in this write up?

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

    Sorry if I missed the link in your post, but I wasn’t seeing it (eyes not what they used to be, you know!)

    Thanks.

    1. Brad Dalton Avatar
      Brad Dalton

      That’s the one James. Well coded plugin but can’t integrate with an e-mail service.

      If Jetpack ever integrates the subscriber role with Jetpack subscriptions, then it will be a great plugin.

      Otherwise you may have seen this post http://wpsites.net/best-plugins/how-to-setup-a-membership-site-using-s2-member/

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.