Table of Contents
Creating custom WordPress user roles within a WordPress site offers you various possibilities for segmenting your users, based on the type of audience that you want to target.
Below, I’ll walk you through how to create your own custom user roles with Profile Builder by using the free Roles Editor module.
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.
Edit Capabilities
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:
- read;
- read_private_posts;
- read_private_pages;
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;
- moderate_comments;
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:
Conclusions
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)
Related Articles
8 Best WordPress User Registration Plugins
Not sure what WordPress user registration plugin to use for your project? Going through all the WordPress user registration plugins can be disorienting. You may have spent hours and hours searching for plugins and tutorials to help you with your project, and you’re still as confused as you were when you started. Imagine finding the […]
Continue ReadingHow to Customize WordPress Email Login Behavior (+ Registration)
Searching for a WordPress email login feature so that you can customize your site's login process, such as requiring users to use their email address instead of a username? By default, WordPress lets users log in with either their username and password or their email and password via the default login page. But if you […]
Continue ReadingHow to Password Protect Content, Posts, and Categories in WordPress
There are many use cases for password-protected content in WordPress. For example, you might be a content creator who wants to monetize premium content in the form of subscriptions or memberships. As with everything related to WordPress, password-protecting posts doesn’t have to be difficult. If you’re wondering how to password-protect WordPress content, posts, and even […]
Continue Reading
Can your plugin allow registered users to create their own post and make edits to other people’s posts, but only admins can publish their content?
Hello,
This is possible with WCK: https://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/
It has a front-end posting option with approval: https://www.cozmoslabs.com/docs/wordpress-creation-kit-documentation/frontend-posting/