Hey everyone. I’m working on displaying certain (WordPress) custom admin pages to certain WordPress users based on their roles (Admin, Editor etc)
So I assigned submenu 1 to the Admin and submenus 2 and 3 to the Editor.
add_submenu_page( $parent_slug, $page_title, 'submenu 1', 'administrator', $menu_slug, $function ); add_submenu_page( $parent_slug, $page_title, 'submenu 2', 'editor', $menu_slug, $function ); add_submenu_page( $parent_slug, $page_title, 'submenu 3', 'editor', $menu_slug, $function );
Well, this is what happens: The Editor sees submenus 2 and 3 so that’s good but the admin sees only submenu 1! I thought that the admin would be able to see submenus 1, 2 and 3! It looks I was wrong in thinking this.
What would you suggest I do so that the admin sees all 3 submenus while the editor sees only those menus assigned to him?
