If you're a WordPress developer, chances are from time to time; you just want a…
Managing different users and user levels on your WordPress install can be a little tedious. For me, a real pain point has been user capabilities, especially when dealing with things like custom post types and private pages. There are a few plugins out there which ease my pain a bit, and Members is one of them.
What’s It Do?
When you install and activate Members, you get a new option under Users called Roles. Roles allow you to sign certain capabilities to specific user types by checking off a few boxes. By default, WordPress comes with a few different roles (subscriber, contributor, editor, etc.) but with Members, you can add as many more as you’d like. When you edit these roles you’ll be given a list of capabilities and you can select which ones to assign.
You’ll also be given a meta box at the bottom of your posts which allows you to limit access to individual posts. Just choose from the menu what roles have access and they will automatically be blocked.
How’s It Work?
To get started with Members, go to the Roles panel and select Edit underneath one of your user types. This will bring you to a big list of possible capabilities for that role. Most of these will be self-explanatory, such as the publish_pages capabilities, but I encourage you to visit the Roles & Capabilities page on the Codex if you get tripped up. To edit a role’s capabilities simply check or uncheck the boxes you would like to assign, and then click the “Update Role” button.
You’ll also notice the Custom Capabilities section at the bottom. If you created a new capability outside of WordPress core, you can add it here. This is useful, for instance, if you are setting up a custom post type with a new capability type.
There’s one more feature. At the bottom of each one of your posts, you will see a new meta box entitled Content Permissions. Here you can Select which roles will have access to that post’s content. By default, none of the boxes will be checked meaning that all roles will be able to view the post, but you may find this feature useful from time to time. There is also a Custom Error Message field if you want to display specific text to those that do not have access (Whatchu doin’ in my post, boy! or whatever).
Costs, Caveats, Etc.
Members is completely free, no muss, no fuss, as Justin often does.
On the support side, I do wish there was a little more. Most help you get will be from the community, not from Justin himself, but he’s around sometimes. Same with updates, so I’ll have to keep my eye on this one.
One caveat I’ll add. If you are using the Members plugin, don’t try to set up your own custom capabilities, especially with map_meta_cap. I’ve run into some pretty nasty conflicts there.