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 using my Child of TwentyTwelve

Just for your knowledge, I have two sections to my one WordPress site... one is called pain, the other called anesthesia (It's a medical site for the curious).

I have created two menus: "pain-menu" and "anesthesia-menu"... of course, I would like each menu to be seen on its corresponding section. Currently, "pain-menu" is selected for the Primary Menu and is seen all across the site.

I'm using the Default page template for the Pain section.

I have also created a page template called... wait for it... "Anesthesia." I can currently select this template when creating new pages for the anesthesia section.

Even more, this Anesthesia page template calls its own header, called 'header-anesthesia'. No surprises there.

So, the question is- how do I hard-code the call for "anesthesia-menu" in the 'header-anesthesia'... or is this even possible?

Thanks for taking the time to attempt to help.

share|improve this question

Use the 'theme_location' argument in header-anesthesia.php:

        'theme_location' => 'anesthesia-menu'

WordPress will look for a menu assigned to this location now and pick that instead of the default menu.

share|improve this answer
Thanks for the very quick response, @toscho, I appreciate it. I think your suggestion is on the right path, but it didn't work correctly for me. When I applied your sample code to appropriate area within the header template, it actually combined both of the menus. My preview site: uni4painrx-preview.com Looking at my home page, you shouldn't see "welcome", "types" or "locations A"... those links belong in the anesthesia-menu. Perhaps I'm not understanding how the custom Menus work? It wouldn't be the first time I didn't' get it. : ) – Chad Austin May 22 '13 at 6:17

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.