Is there any possible way in wordpress to change the class of “li” to wp_nav_menu() without using Walker?

'sub-menu' => 'dropdown',

I tried something like this but it didn’t work:

$args = array('theme_location' => 'navigate',
                'container' => '',
                'container_class' => 'none',
                'menu_class' => 'nav middle navbar-nav',
                'menu_id' => 'none',
                'sub-menu' => 'dropdown',

wp_nav_menu( $args );


I need a simple solution, just not to use Walker.

Read more here: WordPress change li class name without walker?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: