Change role access to Menus and Widgets

WordPress menus and sidebars/widgets are really powerful modules, but unfortunately it requires Admin user role to edit them.

If you would like to allow users with Editor user role to edit any of the widgets or menus, just paste the code below into your themes functions.php file.

Code Snippet:

<?php
// get the the role object
$role_object = get_role('editor');
// add $cap capability to this role object
$role_object->add_cap('edit_theme_options');
?>

Posted in Admin area