• Buchanan Webmaster

    (@jeffsydor-bipc)


    I’m trying to adjust how some things are displayed to an editor user.

    Namely in the Appearance menu. I want them to have access to Widgets and Menus, but not Themes, Customize, Background and Editor.

    What would be the best way to do this?

    What I did: I used another plugin called User Role Editor to access core and custom capabilities per user type. I then created a new custom capability called editor_appearances. Going back into Admin Menu Editor, I copied the Menus and Widgets out of Appearances and pasted into the primary menu nav. Then I set the Required capability dropdown to the custom capability I created.

    When I tested this, it did not work. Is there something I did wrong or could do better?

    Thank you much!

    https://wordpress.org/plugins/admin-menu-editor/

Viewing 1 replies (of 1 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    Your approach was a good idea, but unfortunately it won’t work due to technical limitations of the free version of Admin Menu Editor.

    The “required capability” field acts as an additional filter on top of existing menu permissions. For example, if the original required capability is edit_theme_options and you set it to editor_appearances instead, the result will be that only users that have both of those capabilities will be able to to see it.

    There are two ways to solve this:

    1) Use User Role Editor to give Editors the edit_theme_options capability. This will let them access “Widgets” and “Menus”, but probably also enable “Background” and “Customize”. The capabilities used by WordPress simply aren’t granular enough to show or hide individual menu items.

    2) Get the Pro version of Admin Menu Editor. In the Pro version, you can just click on a role and then check the boxes next to “Widgets” and “Menus” to give the role access to those items. (Internally that also gives the role the edit_theme_options capability, but AME ensures that only the selected menu items are visible.)

Viewing 1 replies (of 1 total)

The topic ‘Activating Specific Sub-menu items to a user’ is closed to new replies.