I've looked everywhere, but i can't find a solution.
My secondary menu isn't adding any current classes to the
I have added this menu in my functions.php file
function register_menus() {
register_nav_menus(
array(
'second-menu' => __( 'Second Menu' )
)
);
}
Then I created a menu in wordpress with the links I want to show in my Second Menu. After that I've added the menu with the function wp_nav_menu in the .php file where I want the menu to show:
<?php wp_nav_menu( array( 'theme_location' => 'second-menu' ) ); ?>
So far everything works. The menu is showing with the links I want it to show. All the links are working. My problem is, that the 'current' classes which WP normally adds to the menus aren't added to this menu. I've expected the classes current-menu-item or current-page-item to the
- menu-item
- menu-item-type-post_type
- menu-item-object-page
- menu-item-[number]
Thanks for the help, Angelo