添加查看权限从wp-adminedit.php?post_type=course 。角色是作者

问题描述 投票:0回答:1

当我从用户中设置作者角色时,在我的自定义文章类型视图列表中不能访问该用户。但我可以编辑单个自定义帖子类型,但在管理页面中无法访问自定义帖子类型列表。

我尝试使用插件,但问题一直存在。s

wordpress roles
1个回答
0
投票

解决了!

我无法访问管理页面的这个区域,因为在注册管理菜单时,我只给了访问权限。管理员 角色。

add_menu_page(
                'Academist LMS',       // The value used to populate the browser's title bar when the menu page is active
                'Academist LMS',       // The text of the menu in the administrator's sidebar
                'administrator',  // What roles are able to access the menu
                'academist_lms_menu', // The ID used to bind submenu items to this menu
                '',               // The callback function used to render this menu
                $academist_elated_global_Framework->getSkin()->getSkinURI() . '/assets/img/admin-logo-icon.png', // Icon For menu Item
                10                // Position
            );

将管理员角色改为你的角色。或者获取当前用户角色。这个文件我在我的主题核心插件中找到的。

© www.soinside.com 2019 - 2024. All rights reserved.