How do I customize WordPress's wp_nav_menu function -
i'm working on wordpress site , top nav generated by:
<?php wp_nav_menu(array('container_class' => 'nav', 'sort_column' => 'menu_order', 'theme_location' => 'top_nav')); ?>
and picks nav items defined list in wp_admin.
thing is, want each item have extra, conditional, css on it. specifically,
1) on hover, want text color up, same-colored line appear.
2) when i'm in area (determined slug) want menu item stay colored. i.e.: active
3) each of menu items have different colors - it's not universal across nav.
obviously, css behind simple. question how keep "black box" aspect of using wp_nav_menu() still able put conditional code in nav.
is possible?
thanks!
using wp_nav_menu() : custom walker can customized own way menu item example: https://wordpress.stackexchange.com/questions/14037/menu-items-description-custom-walker-for-wp-nav-menu
Comments
Post a Comment