WordPress.org

Forums

Allow editors to change menus (1 post)

  1. Marteens
    Member
    Posted 2 years ago #

    Hi.
    I would like my editors to be able to create a page and then put the page in a menu. But I don't want them to be able to have all the admin possibilities. I found this code from several 2 year old threds;

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

    I tried to copy this at the end in
    wp-content--> themes--> rumput-hijau--> functions.php
    but then when I go into my wordpress dashboard, I have this text on the top of my screen:

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

    So I haven't asked my editors if they now can edit menus, but I have a feeling that the code didn't do what I hoped for. Is the code outdated? Have I done something wrong? What can I do?

    I hava a multisite and I am using the rumput-hijau-theme.

    This is my site.

Topic Closed

This topic has been closed to new replies.

About this Topic