Having an issue with wp_nav_menu displaying custom navigation

For Bootstrap, implementing WordPress menu is a bit tricky. It needs a Custom Walker Menu class to be implemented.

Here’s a complete tutorial how you can implement a WordPress Nav Menu with Bootstrap:

The Custom Walker Class can be found here on GitHub:

But on this integration, please note:

The following code block is important, where we are accepting only 2 level of the menu. The Bootstrap 3.0 developers choose the max level of a navbar menu to be 2 level deep.

<?php /* Primary navigation */
    wp_nav_menu( array(
      'menu' => 'top_menu',
      'depth' => 2,
      'container' => false,
      'menu_class' => 'nav',
      //Process nav menu using our custom nav walker
      'walker' => new wp_bootstrap_navwalker())
    );
    ?>

If you want multilevel menu, then Edward also provided a technique for Bootstrap 2.3.2 with multi-level support: