0

I want to add class to ul and li using wp_nav_menu , I have checked documentation and I found this :

wp_nav_menu(array('theme_location'=>'primary','menu_class'=>'navbar-nav'));

but the class is showing on div instead of ul , do anyone has an idea how to add class to ul and li I have added also this code to functions.php

function wpb_custom_new_menu() {
    register_nav_menu('primary',__( 'Main Menu' ));
}
add_action( 'init', 'wpb_custom_new_menu' );

Please note that I am using Underscores Starter theme Thanks in advance

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.