Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function dotspice_menu_item_as_active($classes, $item) {
- if( in_array('my-custom-class',$classes) && ( is_category('my-category') /* OR ...*/ ) ) {
- $classes[] = 'current-menu-item';
- }
- return $classes;
- }
- add_filter('nav_menu_css_class', 'dotspice_menu_item_as_active', 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement