What is the capability that permits access to WP-Admin?

Anyone with a login can access the admin area, even if they’re just a subscriber that can read posts and nothing more.

The crucial difference is not in the login, but in what parts of the admin one gets access to. A subscriber will only be able to see his personal profile, for instance. And admin gets access to everything. Others get something inbetween.

If you build a new user role, you can determine exactly what he or she gets acces to, by assigning one or more of the 58 capabilities to that role.

The general syntax to add a new role is like this: add_role( $role, $display_name, $capabilities ), where the last variable is an array of the capabilities you want to assign to this role. Only these capabilities will be available to those users in the admin area.

Leave a Comment