Title: Admin Menu highlighting
Last modified: August 18, 2016

---

# Admin Menu highlighting

 *  [clay](https://wordpress.org/support/users/clay/)
 * (@clay)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/admin-menu-highlighting/)
 * Sorry if this has been answered previously- I really had no idea how to search
   for it.
    Every time I add a new function to the admin menu- if I wrote the code
   more than one tab becomes highlighted. For example: I created a gallery with 
   an upload function which is called from the admin menu- I added the line: `array(
   __('Gallery'), get_settings('fileupload_minlevel'), 'preupload.php'),` To my 
   menu.php The code works properly however when I click ‘Gallery’ the ‘Upload’ 
   tab is also highlighted. When I installed the filemanager hack it didn’t happen
   though- even though I used the same code for the menu item. This same problem
   happened for a navigation hack I made- where two tabs in the admin menu are highlighted
   when I click one. Any ideas?

Viewing 1 replies (of 1 total)

 *  [nickknowledge](https://wordpress.org/support/users/nickknowledge/)
 * (@nickknowledge)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/admin-menu-highlighting/#post-97550)
 * Further down the menu.php file, find this line:
    `if ( substr($self, -10) == 
   substr($item[2], -10) )` and change it to: `if ( substr($self, -20) == substr(
   $item[2], -20) )` depending on the length of your file names. E.g. if you’re 
   creating files with names like “navigation-admin.php” and “navigation-options.
   php”, 10 characters won’t be enough to distinguish the two. Hope this helps.

Viewing 1 replies (of 1 total)

The topic ‘Admin Menu highlighting’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [nickknowledge](https://wordpress.org/support/users/nickknowledge/)
 * Last activity: [21 years, 8 months ago](https://wordpress.org/support/topic/admin-menu-highlighting/#post-97550)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
