Remove current class from sub menu items

Use following code as jQuery: jQuery(‘#nav li’).removeClass(‘current’); jQuery(‘#nav>li.current-menu-item’).addClass(‘current’); jQuery(‘.has-children li.current-menu-item’).closest(‘.has-children’).addClass(‘current’); See jsfiddle (current item red color). When you click “Single Blog” menu item your html structure will like my following example and jQuery will remove class active from it and add class it’s parent exactly like what you wanted. https://jsfiddle.net/dom8188s/

add span class and i tag inside wp_nav_menu link anchor tag

You can use the wp_nav_menu() arguments like so: wp_nav_menu( array( ‘menu’ => ‘Whatever Your Menu Name Is’, ‘link_before’ => ‘<span class=”main-nav__item-icon-wrapper”><i class=”main-nav__item-icon icon-home”></i></span><span class=”main-nav__item-content”>’, ‘link_after’ => ‘</span>’ ) ); link_before and *_after will add anything before/after the text inside the link where just the normal argument before and after will add anything before/after the entire … Read more

WP Walker using custom css classes

Not sure you want to do it like this, but just in case, you can use the filter nav_menu_css_class : function my_special_nav_class( $classes, $item ) { if ( is_single() && $item->title == ‘Blog’ ) { $classes[] = ‘special-class’; } return $classes; } add_filter( ‘nav_menu_css_class’, ‘my_special_nav_class’, 10, 2 ); You’ll find more example here

Bootstrap Navwalker not displaying

I use it this way. I have never encountered any problems. Bootstrap 3.x Navigation with dropdown for wordpress. <nav class=”navbar navbar-default”> <div class=”navbar-header”> <button type=”button” class=”navbar-toggle collapsed” data-toggle=”collapse” data-target=”#bs-navbar-collapse” aria-expanded=”false”> <span class=”sr-only”>Toggle navigation</span> <span class=”icon-bar”></span> <span class=”icon-bar”></span> <span class=”icon-bar”></span> </button> <a class=”navbar-brand visible-xs” href=”#”>MENU</a> </div> <div class=”collapse navbar-collapse” id=”bs-navbar-collapse”> <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)