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

Is it possible to register a menu inside of a theme functions file and have 'Automatically add new top-level pages to this menu' pre-selected? I can't find any info about this in the register_nav_menus documentation.

share|improve this question

That function just registers new menus.

If you want to create a custom type of menu, you need to create your own extended menu walker that would do something custom or activate any other functionality.

If you would like to have the top pages listed (in a menu or other situation), you can use wp_list_pages and limit to first level (or how many you need).

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.