User Roles

User roles generally have a low impact on most sites where there is a very small number of people managing the site.

In those situations, it makes sense for the one or two people who are involved in the managing the site to have full administrator access.

However, as your site grows in complexity, it becomes more and more important to develop an access model that gives people the minimum rights they need.  For example, if someone is going to be managing a small amount of content, then they don’t need the rights to manage users, add plugins etc

So managing roles can be seen as part of securing your site.

WordPress Roles

WordPress has the following default roles:

  1. Administrator
  2. Editor
  3. Author
  4. Contributor
  5. Subscriber

If someone signs up for your site eg to add a post comment, they will by default be given the minimum access rights ie subscriber.

We won’t spend too much time on user roles but it is a power part of the WordPress platform, especially as sites grow in size and complexity.

Task

One way WordPress can apply roles is by providing content based on role.

In this exercise, we will add Menus for different roles.

Install and activate the Nav Menu Roles plugin.  Add a menu item for admins only – check that it is displayed when you are logged in as admin but is not displayed for anyone else.

Nav Menu Roles

Further Reading

https://www.wpbeginner.com/beginners-guide/wordpress-user-roles-and-permissions