• Resolved Deewon

    (@deewon)


    With WordPress 3.0 and the new menu management I have set up a menu for the top of my website. However in the system if I set links to become children of other menu items it doesn’t work in my current template. It works fine with the Twenty10 template, but they all show as separate menu items with my current template.

    How do I go about configuring my current template to work?

    Is it anything to do with this code in the header.php?

    Twenty10 template:
    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

    My template:
    <?php wp_nav_menu( array( 'theme_location' => 'menu-1' ) ); ?>

    Is that defining drop down menu options?

Viewing 3 replies - 1 through 3 (of 3 total)
  • it’s in the css…. take a look at the menu section of twentyten’s css, I literally copied the css, pasted it in my theme, and the menu’s worked perfectly. Then I started tweaking once it worked

    Thread Starter Deewon

    (@deewon)

    I tried a straight copy paste but my menu just ended up completely un-styled.

    I don’t know whether its an issue that my template CSS reverts to the menu as;
    #main_menu

    whereas twenty10 calls it;
    #access .menu-header,

    well…. first thing is that you have to have your css and menu code match.

    for instance in twentyten, the menu is all wrapped in this <div id="access"> so the corresponding css would be #access

    When I took the css for the menu in twentyten, I also took the exact code from their header.php

    if you are using #main_menu in your css, your menu needs to be wrapped in <div id="main_menu"> to work, first off

    basically, if you use the header.php menu code from twentyten, you can use the css exactly. But if you use your own code in your header.php, then you need to adjust your css to match

    also, you took this part out of the code in header.php 'container_class' => 'menu-header', which is used in the css from twentyten, its another thing you need to account for…. either putting it back in to use twentyten css, or adjusting your css

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I make my menu act like the Twenty10 menu?’ is closed to new replies.