admin管理员组

文章数量:1415111

In the WordPress dashboard on the users page if on filtering by a certain user role I don't want the parent Users menu to be highlighted - this is because I am going to link to that from another menu.

Is it possible to do this? I have attempted to do it using the parent_menu filter but this doesn't work when trying to unhighlight the standard dashboard parent menus, I can do it if it isn't a standard one such as my own post type, but not users.php

I have attempted all the answers in with no luck.

Is there anyway to achieve this or does WordPress simply not take the parent_file filter into account when setting it's own active menu items for core menu pages?

In the WordPress dashboard on the users page if on filtering by a certain user role I don't want the parent Users menu to be highlighted - this is because I am going to link to that from another menu.

Is it possible to do this? I have attempted to do it using the parent_menu filter but this doesn't work when trying to unhighlight the standard dashboard parent menus, I can do it if it isn't a standard one such as my own post type, but not users.php

I have attempted all the answers in https://stackoverflow/questions/2308569/manually-highlight-wordpress-admin-menu-item with no luck.

Is there anyway to achieve this or does WordPress simply not take the parent_file filter into account when setting it's own active menu items for core menu pages?

Share Improve this question asked Jul 18, 2019 at 11:36 bigdaveygeorgebigdaveygeorge 2074 silver badges12 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

I am sure, functions of this page will help you: https://codex.wordpress/Function_Reference/remove_menu_page Take your time, understand these removing functions and you'll be done in no time

本文标签: dashboardIs it possible to remove the highlighted menu on Users and highlight a different menu