I'm working on a website and added a custom meta option for all pages / posts called: "Location".

$value = get_post_meta( $post->ID, '_privacy_location', true );

I'd like to add the value on the menu item in: Appearance->Menus so my client can see what pages have which location !

Can't figure out what hook to use ! Help plz :)


1 Answer 1


The menu items boxes are created by the class Walker_Nav_Menu_Edit in wp-admin/includes/nav-menu.php.

Thus to alter those boxes you'll have to make your custom Walker I guess.

But if you mean adding the new value to the nav menu meta-boxes (the boxes to the left side of the page) this will do the job:

The function that adds new meta_boxes:

function my_function() {
   add_meta_box( 'foo', __( 'Fooo' ), 'callback_function' , 'nav-menus', 'side', 'default' );

The callback that renders the output for the new boxes:

function callback_function( ) {
  global $wp_meta_boxes;

And you can use both:

add_filter( 'manage_nav-menus_columns', 'my_function');


add_action('admin_init', 'my_function');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.