wordpress - 从 /wp-admin/edit.php?post_type=course 添加查看权限。角色是作者
问题描述
当我从用户设置作者角色时,在我的自定义帖子类型视图列表中无法访问该用户。但我可以编辑单个 customposttype,但无法访问管理页面中的 customposttype 列表。
我尝试使用插件,但问题是保持实际。 s
解决方案
解决了!
我在管理页面的这个区域没有访问权限,因为在注册管理菜单时,我只授予管理员角色访问权限。
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
);
将管理员角色更改为您的角色。或获取当前用户角色。我在我的主题核心插件中找到了这个文件。
推荐阅读
- html - 显示 div 内联在 codepen 中工作,但不在浏览器中
- java - 内存中返回的(和没有返回的)对象会发生什么?
- html - Bootstrap 4 pin到顶部导航栏元素
- python - 解析右结合运算符(指数)
- c - 退出循环并终止C程序中的程序
- r - install.packages("devtools") 失败
- javascript - 使用 javascript(Tampermonkey 脚本)在 React 输入中输入文本?
- r - 如何在 R 中导入 .rec 文件
- scala - 如何最有效地在scala中合并和聚合2个地图?
- python - 按类 INSTAGRAM、selenium python 复制标题