Support » Fixing WordPress » show editor the user list

  • Resolved Mark Dalderup

    (@2grafik)


    Hello,

    I am trying to give my editors access to the users list in the admin panel , I have added the following code to the function.php of my theme but it doesn’t seem to work

    function add_user_caps() {
        // gets the author role
        $role = get_role( 'editor' );
    
        // This only works, because it accesses the class instance.
        // would allow the author to edit others' posts for current theme only
        $role->add_cap( 'edit_users' );
    }
    add_action( 'admin_init', 'add_user_caps');

    but when I log in as editor I still cannot access the user list only the profile page, what am I doing wrong?

    Thanks and greetings Mark,

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘show editor the user list’ is closed to new replies.