I am wondering if its possible to add CSS-classes to WordPress menu in backend.

If building complex menus, the overview gets lost - would like to style it a bit.

Normally it would be fine to add the classes entered in field CSS-class.

Any suggestions? Thanks.

enter image description here

  • 1
    Imho is creating a function and "dropping" your css classes inthere should do the trick. See a function I created which you could use as sample and add/edit to your own wishes to make all happen. Be sure using the correct hook(s) – Charles Aug 13 '15 at 14:44
  • Hey, thanks for your answer. The workaround is clear so far. I have no clue which hook or inset I have to use. Any idea? Thank you – BrainBUG Aug 13 '15 at 16:07
  • I dont even know, where to get the CSS-classes from... – BrainBUG Aug 13 '15 at 16:11
  • About the which hooks look at that link. It tells what to use where. About the css classes, you did mention yourself "building complex menus" so that should be easy or?!(if you build, you are the one who creates those classes) Ofcourse you can ask again and show your code when you are struggling with it. – Charles Aug 14 '15 at 4:59

I made it different for that project.

Using ACF Pro (anyway) + a mod of "Code Area". Return that Code Area CSS via

    add_action('admin_head', 'function_name');

in my admin-area. So I am able to put the IDs in my CSS field => Voilà.

A different way, but works exact as I wanted/ needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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