Surprisingly WordPress does not have the feature to only display second or third level menu items. The following script will let you display the second or third level menu items by using a fantastic plugin called “wp_nav_menu Extended!” by Junaid Bhura.

Steps to get this working:

  1. Sign into WordPress
  2. Install the plugin
  3. Use the following code to display the menu. The following checked if there is a third or second level menu items present.
default_menu_level_two = array(
      'menu' => 'main',
      'level' => 2,
      'child_of' => (int)$GLOBALS['wpse16243_title'],
      'container'       => '',
      'container_class' => '',
      'menu_id'    => 'subsite-menu',
      'menu_class'      => 'subsite-menu hidden-md-down',
      'items_wrap' => '<div class="subsite-menu-container"><ul id="%1$s" class="%2$s">%3$s</ul></div>',
      'echo' => FALSE,
  );

  $sub_menu_one = wp_nav_menu( $default_menu_level_two );
  $default_menu_level_three = array(
      'menu' => 'main',
      'level' => 3,
      'child_of' => (int)$GLOBALS['wpse16243_title'],
      'container'       => '',
      'container_class' => '',
      'menu_id'    => 'subsite-menu',
      'menu_class'      => 'subsite-menu hidden-md-down',
      'items_wrap' => '<div class="subsite-menu-container"><ul id="%1$s" class="%2$s">%3$s</ul></div>',
      'echo' => FALSE,

  );

$sub_menu_two = wp_nav_menu( $default_menu_level_three );

if(!empty ( $sub_menu_one )){
 echo $sub_menu_one;
}else if(!empty ( $sub_menu_two )){
 echo $sub_menu_two;
}

wp_reset_query();
  1. Target the menu like you would normally do with the MMenu WordPress plugin.
  2. Ensure your category listing on the page looks like this:
    <nav id="main-menu">
    <ul><?php wp_list_cats();?></ul>
    </nav>
  3. Now for the final part, add this to your functions.php file so the MMenu active class can be implemented in the category layout.
    add_filter( 'wp_list_categories', function( $html ) {
     return str_replace( ' current-cat', ' current-menu-item', $html );
    });