Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add extra fields for each menu item

I am making a theme. There I want to add extra fields for each menu items ( Appearance > Menus and i.e). In the picture below I want to add some extra form fields ( like radio button, textarea and etc. ) under the field "Description":

menu item wordpress

Is there any way or tutorial about how can I do this?

like image 815
Md Kowsar Hossain Avatar asked Jan 13 '14 13:01

Md Kowsar Hossain


1 Answers

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

https://gist.github.com/kucrut/3804376 simple to use and straightforward if you plan to build an elaborate class (note: with mods this could be used for checkboxes, radio, color pickers, ect)

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

http://www.johnmorrisonline.com/how-to-add-a-fully-functional-custom-meta-box-to-wordpress-navigation-menus/ This is very different, it adds an entire mettabox type to the admin menu panel on the LEFT. I elected to use this as I was building my own version of a "mega menu" and wanted to add widgets. With enough work on this item and the one above anything is possible.

Good luck!

like image 127
Christian Žagarskas Avatar answered Sep 19 '22 13:09

Christian Žagarskas