I want to add `has-submenu` class on `li`(child item) But still not working my sub menu.

Please help me.

I want menu Like that : [I want](https://i.stack.imgur.com/sXKze.png)

But my menu is show like that : [My Menu](https://i.stack.imgur.com/7HypQ.png)

Sample Html : [Html](https://i.stack.imgur.com/6fWqp.png)

Header.php

```
<?php wp_nav_menu(array(
'theme_location'=>'primary',
'container' => 'ul',
'container_class' => 'main-menu ',
'menu_class'=>'navigation-menu', 
'link_before' => '<i class="ti-home"></i><span>', 
'link_after' => '</span>',

)); ?>

```

Function.php

```
// This theme uses wp_nav_menu() in one location.
    register_nav_menu( 'primary', __( 'Primary Menu', 'imctheme' ) );

    //add active class in menu
    add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2);
    function special_nav_class($classes, $item){
         if( in_array('current-menu-item', $classes) ){
                 $classes[] = 'active ';  // your new class
         }
         return $classes;
    }

```