0

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.com/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?

1 Answer 1

0

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

1
  • Sorry, but removing a menu page is not what I was asking - I wanted the core menu page to remain but that menu not be highlighted when accessed via a link in another menu item with a specific query var. I can't solve this issue myself. Commented Sep 1, 2019 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.