WordPress Client Area: Part 2

This is the second part in a three-part series about using WordPress as a client area. Read the introduction here, and the third part here.

User access

The first challenge in establishing a WordPress client area is limiting the client’s access to project-specific posts. Out of the box, WordPress doesn’t exactly have this capability; it allows you to create users with a few specific roles, but these roles are designed to limit who can create and manage content, not who can access it. The user role names are emblematic of their purpose. They range from subscriber (a regular reader with a login and profile, but with no administrator or authoring privileges) to contributor, author, editor, and finally administrator.

Fortunately, WordPress is bolstered by a vibrant ecosystem of plugins that can modify how the platform functions. I settled quickly on User Access Manager (UAM), a fairly well-rated plugin that seemed to fill the bill. UAM adds a control panel that allows you to create “user groups” to which you can assign users. Posts can then be assigned to these user groups. Once a post is assigned to the user group, it becomes hidden to users outside the group.

After installing the plugin, the first thing to do is open the UAM control panel and configure the plugin settings. In the two sections “Posts” and “Pages Settings,” click “yes” to hide the posts and pages unless the user is assigned access to it. In the “File Settings” section, click “yes” to lock files. Be sure to add all image and media types to the “file types not to block” box of the “Locked File Types” section, otherwise the browser will display an FTP lock message when a page with an image tries to load. In the last section, “Other Settings,” set a message for admin hint text, which will display next to the post title of hidden posts when you view the site logged in as an admin. I set it to “ (hidden).” Don’t forget the space before the first parenthesis!

Next, we need to create user groups for each of our clients by giving the group a name and clicking “Add User Group.” Don’t check any roles under the “Role Affliation” section; otherwise all users with that affiliation will be automatically assigned to that user group.

Now, open the Users control panel. You’ll need to create login credentials with a user role of subscriber for each of your clients. But wait, you may ask, didn’t we just create user groups? Why do we also need to create a user for each of our clients? Keep in mind that the UAM plugin seems to have been developed for subscription blogs with tiered content and many users. For our purposes, each user group only needs one user assigned to it.

Once you’ve created the user for each of your clients,* you need to assign each user to the proper user group. Click on the Users control panel again, then edit your first client user. You’ll notice that a new section for “User Groups” has been added to the bottom of the control panel. Check the box for the proper user group, and update the user.

All that’s left is to assign posts to the user groups. Create a new post (or edit an existing post), and you’ll notice there is a new admin module called “Access” on the page. Check the proper user group name, and update the post. You’re done!

In the next post of this series, I’ll share how to replace the WordPress logo on the login page with your own branding and how to direct users to the client area, rather than their profile page on the WordPress backend, once they’ve successfully logged in.

*A word of warning: WordPress will send an email to each new user you create. To get around this, I found and installed another plugin, called (appropriately enough) “Disable wp new user notification.”

Posted by Andrew on Dec. 13th | filed as Tutorials & Tips
  • http://www.deeluxdesign.com/blog/how-to-wordpress-client-area-part-3/ How To: WordPress Client Area Part 3 | Deelux: Graphic and web design from Providence, RI

    [...] This is the third part in a  three-part series about using WordPress as a client area. Read the introduction here, and the second part here. [...]

  • http://twitter.com/shikkaba Lisa Cerilli

    There’s a box in the new user area which says “send email to new user?” so the option is given to send one or not. You don’t really need a plugin to disable it.

  • Anonymous

    The option is to send the user’s password by email…regardless of whether the box is checked or not, WP sends the new user an email to inform them of their new account on your site.  I wanted to disable any email (with password or not) to a newly registered user.

  • Anonymous

    You’re right…the link is included at the top of the post :^)