WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 :)

share|improve this question
Try this: justintadlock.com/archives/2011/06/27/… – GhostToast Jun 3 '13 at 14:59
Thanks, but I need to do this for the Menu, not the pages / posts – mkirkpatrick Jun 3 '13 at 15:18
Ah, sorry, misunderstood. Thought you meant 'admin menu', despite you clearly saying "apperances->menu". – GhostToast Jun 3 '13 at 15:19

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');
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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