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

Read More

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

Related posts

Leave a Reply

2 comments

  1. 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!

  2. It all depends on what you want an extra field for, but sometimes this kind of problem can be resolved by looking at an alternative approach: Add in a shortcode in your menu, giving you the programmatic flexibility to customise your menu item output beyond what is offered by WP.