1

OK, this is a basic question...I'm upgrading a theme I built (from scratch) to support 3.0 menus (finally).

With the new wp_nav_menu tag, as expected, the tag's default container is added when a custom menu is assigned only. The added div prevents the custom menu from taking the css I previously created.

I need to be able to support both default and custom menu. Rather than bulking out my css with added selectors to support the new class, I'd like to null the container and container_class in the wp_nav_menu array and state the container in HTML around the tag.

Is there any reason I should not do this? Is there a more elegant way of supporting both default and custom menus?

Thanks for reading.

2

Use 'container' => false, in your wp_nav_menu array

  • Ah, yes, false, not a null value. Turns out there was an extra div in the default format that was dropped with custom menus. I got the same basic hierarchy with container_class => 'menu'. – dooley Jun 16 '11 at 0:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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