首页 > 解决方案 > 从 /wp-admin/edit.php?post_type=course 添加查看权限。角色是作者

问题描述

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

我尝试使用插件,但问题是保持实际。 s

标签: wordpressroles

解决方案


解决了!

我在管理页面的这个区域没有访问权限,因为在注册管理菜单时,我只授予管理员角色访问权限。

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
            );

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


推荐阅读