How Do I Add Capability to a User Role in WordPress?

Assuming you are familiar with WordPress user roles and capabilities, adding capability to a user role is relatively easy. To add capability to a user role, first create a new user role by clicking on the “User Roles” menu item in WordPress admin, and then clicking on the “New Role” button.

Enter the role name in the “Role Name” field, and then select the “Capability” option from the “Role Type” dropdown menu. In the “Capability” field, select the desired capability from the list of available capabilities, and then click on the “Save Role” button.

Once the new user role has been created, the user must be assigned to the role by clicking on the “User Roles” menu item in WordPress admin, and then clicking on the “Assign Role” button. In the “Role Assignment” field, enter the user’s name, and then click on the “Assign Role” button.

The user will now have the selected capability associated with their account.