Support » Fixing WordPress » wp_nav_menu() ID conflict

  • Mal

    (@looimaster)


    How do I avoid ID conflicts if I use the same menu TWICE on one page.

    FIRST
    wp_nav_menu( array( 'sort_column' => 'menu_order', 'theme_location'=>'menu', 'menu_class'=>'menu', 'menu_id'=>'menu' ) );

    SECOND:
    wp_nav_menu( array( 'sort_column' => 'menu_order', 'theme_location'=>'menu', 'menu_class'=>'menu2', 'menu_id'=>'menu2' ) );

    ID conflicts are like “Duplicate ID menu-item-2456″… Any solutions?

  • The topic ‘wp_nav_menu() ID conflict’ is closed to new replies.