0

I am using Wordpress 3+ and Bootstrap 3. To generate the menus I am using the Bootstrap navwalker and the following code...

<?php $args = array('theme_location' => 'primary',
'container_class' => 'navbar-collapse collapse', 
'menu_class' => 'nav navbar-nav',
'fallback_cb' => '',
'menu_id' => 'main-menu',
'walker' => new wp_bootstrap_navwalker()); 
wp_nav_menu($args); ?>

This works great and highlights the menu item when in that section correctly on a parent page, but on a child page, I can't work out how to highlight the menu item.

Any ideas? Basically I have a menu item called 'NEWS'. When i click into a single post in the NEWS section, i want the menu item 'NEWS' to be highlighted like it is on the news post page.

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.