WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've a problem with permission. Is there a specific permission to let an user with Editor Role, manage the custom menu of a theme, and only this options?

The item that is under Appereance -> Menu, to be clear.

I'm using the capability plugin. Must I write a custom hook to enable only the use of custom menu editor ?


Edit: I've code a simple solution. See below my answer!

share|improve this question
up vote 1 down vote accepted

You need to give the editor role the 'edit_theme_options' permission, but that will also unlock other theme options like widgets to those users.

share|improve this answer
Yes, true. This was what I did. This is not exactly what I need. Thanks. I'll try to write a custom hook... – keatch Feb 3 '11 at 13:54

Ok, I've found a way, using the admin_menu action. I post here, in case someone needs it.

This code remove for a specific user all the submenus items except the one for the custom menus in the Appereance menu.

add_action('admin_menu', 'enable_only_custom_menu');

function enable_only_custom_menu() {
    global $menu,$submenu;
    global $current_user;

    if ($current_user->user_login == 'username') {
        foreach($submenu['themes.php'] as $key=>$smenu) {
            if ($smenu[2] != 'nav-menus.php') {

You must iterate the submenu for the key 'themes.php' and deleting all the items that are not interisting for you.

share|improve this answer
Unsetting the menu item may literally stop the user accessing a given page, but that doesn't necessarily mean they can't perform a given action. I'm thinking out loud here, but i'd suggesting looking at $wp_post_types and tweaking the nav menu post-type. When i say tweak i mean hook in and swap out the required capabilities for that type with custom ones(then you can assign those caps as you choose). – t31os Feb 4 '11 at 0:21
..following on... Nav menus are post types, so like any other post type they have a set of capabilities required to manage them, hooking in at an appropriate point might provide a means for tweaking the capabilities required to manage that post type(custom caps, or whatever). – t31os Feb 4 '11 at 0:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.