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.

1 Answer 1


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.

  • 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. : ) Commented May 22, 2013 at 6:17

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.