0

Sorry for what is probably a very basic question - I've managed my own WP site for a fair while now and am bringing a colleague on to help as I'm undertaking a project at work which will take up more of my time.

I'm trying to decide if I should give my colleague admin or editor access. Am I right in saying an editor cannot touch appearances, widgets etc?


Thanks for your help - there is so much info out there it is hard to know what is and is not a viable source.

Is there anyway to edit the role to allow the user to edit a single appearance area such as widgets?

  • The answer section is intended only for answers. Please leave a comment instead of posting answers to discuss the problem. – Jack Johansson May 22 '18 at 9:09
3

You are right indeed, users with the "editor" role do not have the 'edit_theme_options' capability, which is required to access the following:

Appearance > Widgets
Appearance > Menus
Appearance > Customize if they are supported by the current theme
Appearance > Background
Appearance > Header

(source)

For a complete reference of roles and capabilities, and what each capability stands for, you can refer to this page in the codex: https://codex.wordpress.org/Roles_and_Capabilities

Alternatively, you can also create a dummy user, give it the editor role (or any other), and login as this user so you can see for yourself exactly what you can and cannot access.

In case the built-in roles and capabilities won't give you the exact combination of accesses and restrictions you are looking for, you can also edit them so they fit your needs.

There are plugins for this. This is not a place to recommend a specific plugin, but a Google search for something like "WordPress plugin edit user roles" should help.

0

You can add the capability to any user role as like an example code below

 function add_custom_caps() {
  // gets the editor role
  $role = get_role( 'editor' );
  $role->add_cap( 'edit_theme_options' ); 
 }
add_action( 'admin_init', 'add_custom_caps');

Note: Use this code to your theme's functions.php file. Hope this will help a lot.

Reference Links

https://codex.wordpress.org/Roles_and_Capabilities https://codex.wordpress.org/Function_Reference/add_cap

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.