Creating custom WordPress user roles within a site offers you various possibilities for segmenting your users, based on the type of audience that you want to target.
Why and when to use Roles Editor from Profile Builder
WordPress comes along with a few default user roles that are all that is needed for a site that requires user registration and user login. However, there are a few cases where a certain type of websites requires a custom user role that doesn’t fit the default ones:
- Administrator: a user role that has access to all the administrative functions of the website;
- Author: a user role that offers access to users to publish and manage their own posts;
- Contributor: a user role that offers access to users who can write and manage their own posts, but yet can publish them;
- Editor: a user role that can publish and manage posts of all users, including their own;
- Subscriber: a user role that has access to read content posted on a site and edit his profile.
These default user roles have capabilities that can help most type of websites. But, for example, if you are running an online magazine with two type of content: free articles to read and private articles, available only for Premium Subscribers, you will basically need a new type of user role for your Premium Subscribers. Along with this, you should consider creating a user role for someone in your team, that will moderate comments.
You might also want to redirect users after login or registration based on a custom user role.
How to use Roles Editor
The Roles Editor is available on both versions of Profile Builder, free and Pro starting with the version 2.6.2 or higher.
To ensure that Roles Editor will work on your website, please make sure to update Profile Builder to the last version, mentioned above and follow all the steps described in the documentation.
To sum up the process, you need to activate Roles Editor from your WordPress Dashboard → General Settings → Save Changes, and then move forward to the Roles Editor sub-page, under Users section.
Create and Manage The Custom WordPress User Roles from Profile Builder
Edit User Roles
Same as for user roles, there are various capabilities available and if you need something specific, you can extend them by creating new ones, or by installing other plugins. An example of these type of plugins is WooCommerce, that offers you capabilities specific to an eCommerce site.
Now, for our Online Magazine, we said we want two type of users with two type of capabilities, to do different actions:
The first one is your Premium Subscriber, that will can read the private articles published on the site:
For this one we will create a mew User Role from scratch, within the WordPress Dashboard -> Roles Editor -> Add New Role.
And the next one is your Comments Moderator, that will do the following actions:
- read all the posts;
- edit articles, both public and private;
Here, we already have the Editor that includes these capabilities, so we choose to clone this user role and delete the capabilities we don’t need:
So, we passed through all the steps required to set up custom WordPress user roles within a site and I hope this tutorial helped you understand better user roles and capabilities. If you liked this article or have a few more questions regarding Profile Builder’s Roles Editor, please share them below, in the comments section.
Meanwhile, we are going further with the Free Version of Profile Builder, that recently reached 1 Million Free Downloads (Stay tuned for another article, on this topic!) and regarding the new features, here they are:
- You can now register users with different roles, by having the feature of selecting a user role inside the registration form (Read more in the documentation)
- We’ve added ReCaptcha in the free version, in order to help you fight against spam registration and brute force login attempts (Read more in the documentation)
Subscribe to get early access
to new plugins, discounts and brief updates about what's new with Cozmoslabs!