Title: wp_nav_menu_item_custom_fields
Published: April 1, 2020
Last modified: May 20, 2026

---

# do_action( ‘wp_nav_menu_item_custom_fields’, string $item_id, WP_Post $menu_item, int $depth, stdClass|null $args, int $current_object_id )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_nav_menu_item_custom_fields/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_nav_menu_item_custom_fields/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_nav_menu_item_custom_fields/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_nav_menu_item_custom_fields/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/hooks/wp_nav_menu_item_custom_fields/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_nav_menu_item_custom_fields/?output_format=md#wp--skip-link--target)

Fires just before the move buttons of a nav menu item in the menu editor.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_nav_menu_item_custom_fields/?output_format=md#parameters)󠁿

 `$item_id`string

Menu item ID as a numeric string.

`$menu_item`[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)

Menu item data object.

`$depth`int

Depth of menu item. Used for padding.

`$args`stdClass|null

An object of menu item arguments.

`$current_object_id`int

Nav menu ID.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_nav_menu_item_custom_fields/?output_format=md#source)󠁿

    ```php
    do_action( 'wp_nav_menu_item_custom_fields', $item_id, $menu_item, $depth, $args, $current_object_id );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-walker-nav-menu-edit.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/class-walker-nav-menu-edit.php#L280)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/class-walker-nav-menu-edit.php#L280-L280)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_nav_menu_item_custom_fields/?output_format=md#related)󠁿

| Used by | Description | 
| [Walker_Nav_Menu_Edit::start_el()](https://developer.wordpress.org/reference/classes/walker_nav_menu_edit/start_el/)`wp-admin/includes/class-walker-nav-menu-edit.php` |

Start the element output.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_nav_menu_item_custom_fields/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.4.0](https://developer.wordpress.org/reference/since/5.4.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/hooks/wp_nav_menu_item_custom_fields/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/hooks/wp_nav_menu_item_custom_fields/?output_format=md#comment-content-4323)
 2.   [tripflex](https://profiles.wordpress.org/tripflex/)  [  6 years ago  ](https://developer.wordpress.org/reference/hooks/wp_nav_menu_item_custom_fields/#comment-4323)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_nav_menu_item_custom_fields%2F%23comment-4323)
    Vote results for this note: 1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_nav_menu_item_custom_fields%2F%23comment-4323)
 4. Release details on this can be found here:
     [https://make.wordpress.org/core/2020/02/25/wordpress-5-4-introduces-new-hooks-to-add-custom-fields-to-menu-items/](https://make.wordpress.org/core/2020/02/25/wordpress-5-4-introduces-new-hooks-to-add-custom-fields-to-menu-items/)
 5.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_nav_menu_item_custom_fields%2F%3Freplytocom%3D4323%23feedback-editor-4323)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_nav_menu_item_custom_fields%2F)
before being able to contribute a note or feedback.