WordPress change li class name without walker?

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:

<?php
$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?

Leave a Reply

Your email address will not be published. Required fields are marked *