Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2);
- function special_nav_class($classes, $item){
- $menu_locations = get_nav_menu_locations();
- if ( has_term($menu_locations['Videos'], 'nav_menu', $item) ) {
- return preg_replace('/<a /', '<a class="list-group-item list-group-item-danger active"', $nav_menu, 1);
- }
- return $classes;
- }
- //Result
- Warning: join() [function.join]: Invalid arguments passed in /home/robertom/public_html/wp-includes/nav-menu-template.php on line 98
- Warning: join() [function.join]: Invalid arguments passed in /home/robertom/public_html/wp-includes/nav-menu-template.php on line 98
- GlaxoSmithKline Intel – Mobility
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement