Providing Wordpress editor to manage Menu, Widget and Background in Appearance Section

After launching a WordPress 3, WordPress can definitely claim to be most used CMS to manage website and blog contents. While its still not as complete CMS as some of the other great CMS, but WordPress is definitely most widely used Content Management System today.

And many web masters use WordPress as CMS to provide easy to manage CMS to their clients. We use WordPress for our clients too. And while we do offer some of them an Admin user, to others we offer editor user. Because, sometimes its dangerous to play with admin user, when your clients does not fully understand WordPress or are web novices.. they can easily mess up the website under Admin level.

But to manage website efficiently using editor role, client needs to manage Menu (WordPress Menu) to be able to modify the navigation, as well as update Widget. Using normal editor role, they are not presented with Appearance section of the WordPress administrator panel.

So what we want is to allow editor to manage menu, widget, background colors from their editor login. While this is not presented by default to the editor, we can change this with a simple following code.

Following code will allow the Editor role access to: Menus, Theme Options (but will not be able to switch, add or edit themes), Background (3.0+), Header (3.0+) and Widgets.


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

You need to add above code into your theme function.php file.

While you don’t always require to allow editor to manage these functions, you can add above code only for those clients where you are offering them editor login to manage their contents and site.

Related Posts

7 COMMENTS

  1. Elle
    July 28, 2011 10:03

    I have been looking all day for a solution to allow my clients to access the widgets area and NOT the rest of the admin functions so thanks for a simple quick solution which works perfectly without needing a complex plugin!

    • July 30, 2011 05:57

      Dear Elle,

      Glad to know it helps you.

  2. August 17, 2011 11:40

    Great hack, but is it also possible to grant editors only access to editting the menu and not widgets etc. ?

  3. April 05, 2012 18:35

    Thanks for the share! I often have to fight with myself to make the client a admin or not.

    This is really going to help.

    James

  4. imran
    April 21, 2012 18:58

    Nice ! it is working. Thanks !

  5. Nicky Dumler
    May 26, 2012 17:25

    Your simple tips really saved my day.. looking to do exactly this since long. Thanks

  6. Gianluca
    December 21, 2012 10:12

    I put that code into my config.php file, to try how it works, and it works perfectly but, when i delete the code from config.php,
    editors have admin rights on widgets and menu yet.
    Why? Is it possible to return to original configuration?
    Thank you