最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

admin - Adding CSS-class to WordPress Menu in backend

programmeradmin0浏览0评论

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.

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.

Share Improve this question asked Aug 13, 2015 at 14:23 BrainBUGBrainBUG 358 bronze badges 4
  • 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 Commented Aug 13, 2015 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 Commented Aug 13, 2015 at 16:07
  • I dont even know, where to get the CSS-classes from... – BrainBUG Commented Aug 13, 2015 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 Commented Aug 14, 2015 at 4:59
Add a comment  | 

1 Answer 1

Reset to default 1

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.

发布评论

评论列表(0)

  1. 暂无评论