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 want to add a meta box to the menu page. More specifically I want to basically clone the pages or category meta box and have it load the items into the list from a meta key, instead of pages or categories.

My theme is one page, so users create content for the front page with posts. When users make posts on my theme it has the option to add an ID(it adds it into the code) so a menu item can be added to the top menu and when it is clicked it will scroll to that item with that id. The way it currently works is the user enters the ID and then on the front-pages code I added some code to pull all items from the metakey and populate the menu.

With this I have had many problems so I would rather have a meta box on the menu page with the sections(posts) already populated so the user can choose what sections(posts) they want to add to the menu. Hence I think I could just use the category or pages meta box code and modify it to my needs, so it leads me to my question: Where can I find the code for the menu page meta boxes?

share|improve this question
up vote 0 down vote accepted

The meta boxes for the Appearance->Menus section are in /wp-admin/includes/nav-menu.php.

The meta boxes for posts and pages are mostly in /wp-admin/includes/meta-boxes.php, if you need those.

share|improve this answer
Got it working already. Thank you :) – user1632018 Apr 30 '13 at 18:56

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.