/ Published in: PHP
Instructions:
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.
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.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?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'); ?>
URL: http://wp-snippets.com/change-role-access-to-menus-and-widgets/