Posted By

lromak on 10/28/13



Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Change role access to Menus and Widgets

 / Published in: PHP



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.

  1. <?php
  2. // get the the role object
  3. $role_object = get_role('editor');
  4. // add $cap capability to this role object
  5. $role_object->add_cap('edit_theme_options');
  6. ?>

Report this snippet  

You need to login to post a comment.