Wordpress - Adding class to the href in the using wp_nav_menu
I was wondering if its possible to add a class for the current page to the href tag instead of the li tag that wordpress开发者_Python百科 uses by default.
By menu arguments are as follows:
<?php wp_nav_menu( array(
'theme_location' => 'main-menu',
'container' => '',
'menu_class' => '',
'menu_id' => 'nav'
) ); ?>
Cheers,
why do you want to do this? you can access the A in css using something like this:
#nav li.current-menu-item a {
text-decoration:underline;
}
what exactly do you want to achieve?
精彩评论