Forums

Custom Dynamic Menus & Sub Menus (1 post)

  1. aklahiri
    Member
    Posted 1 year ago #

    Hello,

    Problem: Display custom dynamic menus and submenus.
    Version: 3.1.2

    1. I have created menus and submenus from admin panel and its designed perfectly.

    2. I am trying to display the same in the header of my custom theme. The code is as below.

    <?php
    $args = array(
    'theme_location' => 'primary',
    'menu' => 'menu1',
    'container' => 'div',
    'container_class' => 'menu-header',
    'container_id' => 'navigation',
    'menu_class' => '',
    'menu_id' => '',
    'echo' => true,
    'fallback_cb' => 'wp_page_menu',
    'before' => '',
    'after' => '',
    'link_before' => '',
    'link_after' => '',
    'items_wrap' => '<ul id=\"%1$s\" class=\"%2$s\">%3$s',
    'depth' => 0,
    'walker' => '');

    wp_nav_menu($args);
    ?>

    I am getting only the menu items. Sub menus and sub sub menus etc are not being displayed. Please let me know where I am wrong.

    Thanks a lot in advance.

    Regards.

Topic Closed

This topic has been closed to new replies.

About this Topic