Question

I know how to make meta boxes in pages and posts etc. But how do I add meta boxes to the menu page in the appearence -> menu page, for each menu item.

Add the moment, the menu items have to boxes: "Navigation Label" and "Titel Attribute". But I want to have another meta box for each menu item so the admin can type or choose a CSS class for, let's say, an icon.

The menu item "Home" should have an home icon, "About" an about icon and so on.

How do I accomplish that? Or is there an easy other way I don't know about?

Était-ce utile?

La solution

This feature is built-in. Almost all screens have a Screen Options feature. In Appearence -> Menus, it has an advanced option CSS Classes:

css classes for navigation menus

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top