WordPress.org

Support

Support » How-To and Troubleshooting » How to add extra field to appearance menu item

How to add extra field to appearance menu item

  • wp_fish

    @wp_fish

    I want to add a checkbox field to all the menu items in “appearance->menus”. I’ve googled it and have come up with nothing and there doesn’t seem to be a filter to allow for this.

    Is this possible?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Rod Whiteley

    @rod-whiteley

    Yes, it is possible. You can write JavaScript code (using jQuery, if you wish) to modify any admin screen. You will also need some PHP code to make the new checkbox do whatever you need it to do.

    For example, in one scenario I used the admin_head action to insert a script, and the wp_insert_post_data filter to process the extra data, but there are other actions and filters that you might use.

    wp_fish

    @wp_fish

    Thanks for the response. I was contemplating using jquery to add the extra field but if there is a way to do it using a wordpress php filter then I would rather do it that way. However, I can’t find a filter that caters for this. 🙁

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add extra field to appearance menu item’ is closed to new replies.
Skip to toolbar