为什么菜单栏隐藏在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

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.