WordPress.org

Ready to get started?Download WordPress

Forums

How to add extra field to appearance menu item (3 posts)

  1. wp_fish
    Member
    Posted 9 months ago #

    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?

  2. Rod Whiteley
    Member
    Posted 9 months ago #

    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.

  3. wp_fish
    Member
    Posted 9 months ago #

    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. :(

Reply

You must log in to post.

About this Topic

Tags

No tags yet.