Wordpress - add additional fields for each menu item

I am making a theme. There I want to add additional fields for each menu item (Appearance> Menu) - i.e. In the figure below, I want to add additional form fields (for example, a radio button, text field, etc.) to the Description field.

menu item wordpress

Is there a way or tutorial on how I can do this? Any help would be appreciated

+6
source share
2 answers

I was looking for the same thing. I found them, all of which work differently.

https://gist.github.com/kucrut/3804376 are easy to use and understandable if you plan to build a complex class (note: with mods this can be used for flags, radio, color picker, ect)

https://wordpress.org/plugins/sweet-custom-menu/ This worked fine, very simple, adds the txt field. (note: it overrides the entire wordpress_walker class)

http://www.johnmorrisonline.com/how-to-add-a-fully-functional-custom-meta-box-to-wordpress-navigation-menus/ This is completely different, it adds the entire mettabox type to the admin menu bar on Left. I decided to use this because I was creating my own version of the “mega-menu” and wanted to add widgets. With enough work on this subject and above, anything is possible.

Good luck

+4
source

All Articles