• the-beholder

    (@the-beholder)


    I’m adding menu support to my theme.

    I registered my menus in the functions.php file, I added the line

    <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘depth’ => ‘0’ ) ); ?>

    to my header.

    While it displays the main menu as wanted, none of the child menus appear…

    What am I missing here? Nothing happens when you rollover the Parent menu, so I don’t think it’s even a CSS problem yet…

Viewing 4 replies - 1 through 4 (of 4 total)
  • govpatel

    (@govpatel)

    Does your theme support custom menus click on Appearance>>>>Menus and manage your menu from there.

    Thread Starter the-beholder

    (@the-beholder)

    Yes, I created a menu that should have children, they just don’t get displayed…

    esmi

    (@esmi)

    What happens if you use the Twenty Eleven theme?

    You have:

    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'depth' => '0' ) ); ?>

    Which sets the depth to 0, only displaying the first level of menu items.

    You will need to use:

    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'depth' => '3' ) ); ?>

    Notice I changed the depth to 3. Change this to how many levels you would like.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Child Menus’ is closed to new replies.