I have been trying to find a way to add a class or an id to my custom administration sub menu. I only see a class on the first menu item. I would either like to add a css class or an ID on my sub menu list items.

1 Answer 1


So I found a solution to my problem. I just added a span tag in the add_submenu_page() hook and it work:

     # The slug for the parent menu page to which this sub menu belongs
     # The text that't rendered in the browser title bar 
     'Breaking News Email', 
     # The text to be rendered in the menu
     '<span class="breaking-news-toggle">Breaking News Email</span>',
     # the capability required to access this menu item
     # The slug by which this sub menu is identified
     # the function used to display the options for this menu's page
     array(&$this, 'email_service_form') 

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.