Skip to content

Instantly share code, notes, and snippets.

@certainlyakey
Created April 28, 2014 07:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save certainlyakey/11363872 to your computer and use it in GitHub Desktop.
Save certainlyakey/11363872 to your computer and use it in GitHub Desktop.
Wordpress - allow editors edit menus
// Allow editors edit menus
$role_object = get_role( 'editor' );
$role_object->add_cap( 'edit_theme_options' );
@donnamcmaster
Copy link

This approach has two problems: (1) It allows the editor to have access to all theme (Appearance) options, not just widgets and menus. (2) This code only needs to be run once; it shouldn't be in the functions.php file where it will be run every time WordPress runs.

https://www.thewebtaylor.com/articles/wordpress-allow-editors-to-manage-menus offers the ability to allow access only to menus & widgets, but see the comments on that page as it too has some issues.

@donnamcmaster
Copy link

@certainlyakey
Copy link
Author

Haven't tried the plugin, but both of your points totally make sense, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment