How to hide tools option in menu bar if no submenu is available

How can I automatically remove tools menu in WordPress admin dashboard if no option are available (for example for a user with the editor role).

Insert this code on your functions.php file or plugin:



Submit a Comment

Your email address will not be published. Required fields are marked *