doutan5844 2015-10-05 14:41
浏览 46

为什么菜单栏隐藏在wordpress管理员中

i am working on wordpress where the user has diffrent but after the user login with role subscriber all menus of admin are hiding which should not hide . it should work as usual.how to solve this issue . i want all my menu to appear. before it was redirecting to profile.php .then i made changes in wp-login.php

$redirect_to = user_admin_url();

my idea is, user with all role will be redirect to same page ie wp-admin page .then according to user role remove menu from dashboard by using remove_menu_page

  • 写回答

1条回答 默认 最新

  • dongxie2749 2015-10-06 11:09
    关注

    First:

    Please don't modify core files(including wp-login.php). Your changes will(or could, I'm not sure on that) be lost with the next WordPress update.

    Now, to answer your question - WordPress uses capability checks to ensure that the current user can do certain things. You say that when a Subscriber logs in, they no longer see the WordPress admin menus. Subscriber is the lowest type of user with the least amount of capabilities. They're only allowed to edit their profile and read public posts and pages.

    If you want your users to still access administrative parts of WordPress, then assign them to a different User Role.

    You can see details of all the default User Roles on the Roles and Capabilities page in the WordPress Codex.

    In short, here's a summary of what each role can do(more or less, read the Codex for more details):

    Subscriber

    Can only access the Dashboard and Users > Your Profile admin pages.

    Contributor

    Can do what Subscribers can and also create new posts, edit and delete their own non-published posts.

    Author

    Can do what Contributors can and also publish posts and edit and delete their own published posts, as well as upload files to the Media Library.

    Editor

    Can do what Authors can and also read, edit, delete, publish their own posts and other user's posts and pages(including private ones). The HTML of posts they edit/publish is not filtered(unless running in Multisite).

    Administrator

    Can do what Editors can and pretty much everything else(unless running in Multisite) - installing, activating, updating and editing themes and plugins, changing theme options, etc.


    Again - that's only a short overview and you should carefully read the Codex page in order to decide how much control you want to give to the given user/s.

    评论

报告相同问题?

悬赏问题

  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥115 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line