Edit HTML of WordPress navigation bar
Yes, you’ll need to implement the walker class for this. Here is a simple example. $defaults = array( ‘theme_location’ => ‘primary’, ‘container’ => ‘ul’, ‘menu_class’ => ‘nav navbar-nav main-nav’, ‘walker’ => new Primary_Walker_Nav_Menu() ); wp_nav_menu( $defaults ); In the above block of code, the wp_nav_menu() function takes $defaults as argument. In the array $defaults, the … Read more