• Hello.

    Aim working on menus for the first time. My Theme has a header-menu by default.

    I would like to make a left menu for each of my header menu links.

    1. I added thes code in the theme-init.php thes code:

    // custom menu support
    add_theme_support( ‘menus’ );
    if ( function_exists( ‘register_nav_menus’ ) ) {
    register_nav_menus(
    array(

    ‘header_menu’ => __( ‘Header Menu’ ),
    ‘behandlinger-menu’ => __( ‘Behandlinger’ )

    )
    );
    }
    }
    endif;

    And in a sidebar thes code:

    <?php wp_nav_menu( array(
    ‘container’ => ‘ul’,
    ‘menu_class’ => ‘menu’,
    ‘menu_id’ => ‘menu-header-menu’,
    ‘depth’ => 0,
    ‘theme_location’ => ‘behandlinger_menu’
    ));
    ?>

    Then i added in the menu system “behandlinger” to the menu, behandlinger then i should only have “behandlinger” showing up the the new left menu.

    Problem is that is shows all pages?

    In the header menu it’s only the pages i have added that is showed?

    What did i miss here?

    See it here:

    http://spartamedia.dk/pb/behandlinger/

Viewing 1 replies (of 1 total)
  • Digest WP

    (@jay-stankiewicz)

    Hey,

    In the sidebar code try something like this instead to call the menu

    <?php wp_nav_menu( array( ‘theme_location’ => ‘behandlinger_menu’ )); ?>

    Also make sure in Appearance>Menus the Behandlinger Menu is selected

Viewing 1 replies (of 1 total)

The topic ‘Menu Problem’ is closed to new replies.